In this video we will solve a Amazon SQL interview question on notepad. This will help all the job aspirants to understand how to solve on notepad.
script:
CREATE TABLE subscription_history (
customer_id INT,
marketplace VARCHAR(10),
event_date DATE,
event CHAR(1),
subscription_period INT
);
INSERT INTO subscription_history VALUES (1, 'India', '2020-01-05', 'S', 6);
INSERT INTO subscription_history VALUES (1, 'India', '2020-12-05', 'R', 1);
INSERT INTO subscription_history VALUES (1, 'India', '2021-02-05', 'C', null);
INSERT INTO subscription_history VALUES (2, 'India', '2020-02-15', 'S', 12);
INSERT INTO subscription_history VALUES (2, 'India', '2020-11-20', 'C', null);
INSERT INTO subscription_history VALUES (3, 'USA', '2019-12-01', 'S', 12);
INSERT INTO subscription_history VALUES (3, 'USA', '2020-12-01', 'R', 12);
INSERT INTO subscription_history VALUES (4, 'USA', '2020-01-10', 'S', 6);
INSERT INTO subscription_history VALUES (4, 'USA', '2020-09-10', 'R', 3);
INSERT INTO subscription_history VALUES (4, 'USA', '2020-12-25', 'C', null);
INSERT INTO subscription_history VALUES (5, 'UK', '2020-06-20', 'S', 12);
INSERT INTO subscription_history VALUES (5, 'UK', '2020-11-20', 'C', null);
INSERT INTO subscription_history VALUES (6, 'UK', '2020-07-05', 'S', 6);
INSERT INTO subscription_history VALUES (6, 'UK', '2021-03-05', 'R', 6);
INSERT INTO subscription_history VALUES (7, 'Canada', '2020-08-15', 'S', 12);
INSERT INTO subscription_history VALUES (8, 'Canada', '2020-09-10', 'S', 12);
INSERT INTO subscription_history VALUES (8, 'Canada', '2020-12-10', 'C', null);
INSERT INTO subscription_history VALUES (9, 'Canada', '2020-11-10', 'S', 1);
Zero to hero(Advance) SQL Aggregation:
• All About SQL Aggregations | SQL Advance |...
Most Asked Join Based Interview Question:
• Most Asked SQL JOIN based Interview Questi...
Solving 4 Trick SQL problems:
• Solving 4 Tricky SQL Problems
Data Analyst Spotify Case Study:
• Data Analyst Spotify Case Study | SQL Inte...
Top 10 SQL interview Questions:
• Top 10 SQL interview Questions and Answers...
Interview Question based on FULL OUTER JOIN:
• SQL Interview Question Based on Full Outer...
Playlist to master SQL :
• Complex SQL Questions for Interview Prepar...
Rank, Dense_Rank and Row_Number:
• RANK, DENSE_RANK, ROW_NUMBER SQL Analytica...
#sql #dataengineer
On this page of the site you can watch the video online Solving an Amazon SQL Interview Question on Notepad with a duration of hours minute second in good quality, which was uploaded by the user Ankit Bansal 07 August 2024, share the link with friends and acquaintances, this video has already been watched 20,500 times on youtube and it was liked by 502 viewers. Enjoy your viewing!