SQL Problem Asked in AMAZON | SQL Interview Questions 🔥🔥🔥

preview_player
Показать описание
If you wanna make your career in Data Science domain, then check our course now. We provide hands-on practical learning experience to our learners with 1-1 Live Doubt Clearance Support over Chat everyday and also you will learn Job Hunting Hacks. You will get projects and case studies that you can add in your resume and a lot more features are there inside this course. Check Now!

➡️ Data Science & Analytics Placement Assurance Program

➡️ Data Engineering Placement Assurance Program

➡️ Data Science Combo with Growth Hacking

➡️ Data Analytics/ Business Analytics Combo with Growth Hacking

Our Social Media Channels

Stay Safe and Keep Learning
Рекомендации по теме
Комментарии
Автор

SCRIPT:
create table transactions (
user_id int,
spend decimal,
transaction_date timestamp);

select * from transactions;
insert into transactions( user_id, spend, transaction_date)
values ('111', '100.50', '2022-01-08 12:00:00');
insert into transactions( user_id, spend, transaction_date)
values ('111', '55.00', '2022-01-10 12:00:00');
insert into transactions( user_id, spend, transaction_date)
values ('121', '36.00', '2022-01-18 12:00:00');
insert into transactions( user_id, spend, transaction_date)
values ('145', '24.99', '2022-01-26 12:00:00');
insert into transactions( user_id, spend, transaction_date)
values ('111', '89.60', '2022-02-05 12:00:00');

select * from transactions;

select user_id, spend, transaction_date
from
(select user_id, spend, transaction_date, row_number()
over(partition by user_id) as row_num
from transactions) as trans_num
where row_num = 3;

CloudyML
welcome to shbcf.ru