This playlist contains scenario based SQL problems. After solving these you should be able to ace any SQL interview. As and when I find a good problem, i will add it to this playlist.
Curated by: Ankit Bansal (96 videos)
In this video we are going to discuss Amazon prime subscription rate logic in SQL. here is the problem statement: Given the following two tables, return the fraction of users, rounded to two decimal places, who accessed Amazon music and upgraded to prime membership within the first 30 days of signing up. Here is the script: create table users ( user_id integer, name varchar(20), join_date date ); insert into users values (1, 'Jon', CAST('2-14-20' AS date)), (2, 'Jane', CAST('2-14-20' AS date)), (3, 'Jill', CAST('2-15-20' AS date)), (4, 'Josh', CAST('2-15-20' AS date)), (5, 'Jean', CAST('2-16-20' AS date)), (6, 'Justin', CAST('2-17-20' AS date)), (7, 'Jeremy', CAST('2-18-20' AS date)); create table events ( user_id integer, type varchar(10), access_date date ); insert into events values (1, 'Pay', CAST('3-1-20' AS date)), (2, 'Music', CAST('3-2-20' AS date)), (2, 'P', CAST('3-12-20' AS date)), (3, 'Music', CAST('3-15-20' AS date)), (4, 'Music', CAST('3-15-20' AS date)), (1, 'P', CAST('3-16-20' AS date)), (3, 'P', CAST('3-22-20' AS date));