↳
select distinct year, order_id, avg(quantity) over(partition by year, order_id order by year) as avg_books from table a group by 1, 2 Less
↳
If the question is correct, we can just use group by command, No partition needed. Select orderid, avg(qty) from table group by year, orderid Less
↳
q1. select distinct year, order_id, avg(quantity) over(partition by year, order_id order by year) as avg_books from table a group by 1, 2 q2. USE MAX(QUANTITY) OVER(PARTITIOB BY YEAR, ORDER_ID ORDER BY YEAR) Less
↳
The question is pretty straightforward that we have to exclude the customers that have done the purchase in the past 6 months. Select * from orders where orders.customer_id NOT IN (Select customer_id FROM orders Where date between date_sub(curdate(), Interval 6 months) AND curdate()) AS B; Less
↳
select cust_id ,count(purchase) from order ord (nolock) group by cust_id having count(putchase)>1 where purchase_date not between dateadd(month,-6,getdate()) and getdate() Less
↳
with cust_purchased_recently as ( select cust_id from orders where order_date>= dateadd(month,datediff(month,0,getdate())-6,0) ) Select * from orders as o left join cust_purchased_recently as c on o.Cust_ID = c.Cust_ID where c.Cust_ID is null Less
↳
select employee_id from (select employee_id, salary, avg(salary) over (partition by department_id) as avg_dept from salary) as SourceTable where salary > avg_dept and salary > 50000 Less
↳
Select id,first_name,last_name from (Select * from employees A join (SELECT department_id, avg(salary) as avgsal from employees group by department_id) B on A.department_id=B.department_id) X where salary>avgsal and salary>50000 Less
↳
WITH temp_dept as( SELECT dept_id,avg(salary) as average_department_salary FROM salary GROUP BY dept_id HAVING avg(salary)>50000 ) SELECT emp_id FROM salary s join temp_dept td on s.dept_id=e.dept_id and e.salary>td.average_department_salary Less
↳
SELECT productID,timestamp,productField1,productField2 FROM productTable GROUP BY productID ORDER BY max(timestamp); Less
↳
This sql isn’t even remotely right lol
↳
SQL: 1. Minimum = 0 and Maximum = m * n. 2. Select salary from Emp_salary order by salary desc limit 3,1; 3. Select * from Products where timestamp = (Select MAX(timestamp) from Products) ; 4. Select * from Employees where employee_id NOT IN (select employee.id from Projects) Less
↳
SELECT COUNT(order_id_20pct)/count(order_id) FROM ( SELECT CASE WHEN DATEDIFF('minute',lag(order_datetime) over (partition BY customer_id ORDER BY order_DATETIME),order_datetime) <22 THEN order_id END order_id_20pct, order_id FROM bi_adhoc.AMZTIMES ) Less
↳
SELECT COUNT(order_id_20pct)/count(order_id) FROM ( SELECT CASE WHEN DATEDIFF('minute',lag(order_datetime) over (partition BY customer_id ORDER BY order_DATETIME),order_datetime) <22 THEN order_id END order_id_20pct, order_id FROM bi_adhoc.AMZTIMES ) Less
↳
SELECT ( SELECT COUNT (order_id) FROM ( SELECT customer_id, order_id, order_datetime, DATEDIFF('minute',lag (order_datetime) over (partition BY customer_id ORDER BY order_datetime),order_datetime) order_lag FROM bi_adhoc.amztimes ) WHERE order_lag < 22) / (SELECT COUNT(order_id) FROM bi_adhoc.amztimes) as pct_combined Less
↳
I rate myself 9/10 on a scale of 1 to 10
↳
Thank you! Will check this out
↳
Hi! As an Amazon employee who interviewed and hired a lot of people here, I've created a guide that has all the questions and winning answers from an Amazonian recruiter perspective. Please check it out at interviewjoy.com/services/interview-process-details/amazon-senior-manager-interview-questions/ . Pls also check the positive feedback at the bottom of that page! Thanks. Less
↳
Hi can you please post the answers and the process from questions 5 and on? Having no idea how to solve it.. Less
↳
In the last question, there is a table with figures and measures that you can use to compute the answers Less
↳
Can you explain the eigth question in more detail? Is there a missing part before the sub questions a. b. c. d.? The only data is the number of users : "Question 8 : A/B Testing campaign: Measuring the impact of Criteo retargeting ads compared to a control group. Number of transactions on client site : • Group A exposed to Criteo banners 600,000 • Group B Control group not exposed 50,000" how can you calculate revenue? or something else? Less
↳
The data set they provide has the answer in it as long as you can find it
↳
sounds like this drug-dealing company just wanted you to do some consulting work for free. Typical rip-off company of the modern age, filled with obnoxious young sociopaths Less
↳
Call the police.
↳
Interesting. Almost impossible to imagine they only asked you that one, oddly short and seemingly context stricken question. I'd be interested to know what the other interview questions genuinely were, and what your actual responses were to those ones. That would actually provide some better insight as to what the actual interview process looks like, and if it's a good way to screen competent analysts or security practitioners. Less
↳
Hi, Thanks for this review. There is no real information anywhere about a BI Analyst interview at Google. I have my interview in a few days. Could you please provide more details on the type of technical questions that were asked? Thanks a lot! Less
↳
Hi, Hope you are doing good. I too have interview in few days, can you please provide some details like how to prepare and what to expect. Less