Back to Browse

Twitter SQL Interview Question | Three Days Rolling Average | using Window Function & Self Join

1.3K views
Sep 11, 2024
18:29

In this video we will solve the DataLemur SQL Medium level interview question asked in Twitter Company. SQL Script CREATE TABLE tweet_data ( user_id INT, tweet_date DATETIME, tweet_count INT ); INSERT INTO tweet_data (user_id, tweet_date, tweet_count) VALUES (111, '2022-06-01 00:00:00', 2), (111, '2022-06-02 00:00:00', 1), (111, '2022-06-03 00:00:00', 3), (111, '2022-06-04 00:00:00', 4), (111, '2022-06-05 00:00:00', 5), (111, '2022-06-06 00:00:00', 4), (111, '2022-06-07 00:00:00', 6), (199, '2022-06-01 00:00:00', 7), (199, '2022-06-02 00:00:00', 5), (199, '2022-06-03 00:00:00', 9), (199, '2022-06-04 00:00:00', 1), (199, '2022-06-05 00:00:00', 8), (199, '2022-06-06 00:00:00', 2), (199, '2022-06-07 00:00:00', 2), (254, '2022-06-01 00:00:00', 1), (254, '2022-06-02 00:00:00', 1), (254, '2022-06-03 00:00:00', 2), (254, '2022-06-04 00:00:00', 1), (254, '2022-06-05 00:00:00', 3), (254, '2022-06-06 00:00:00', 1), (254, '2022-06-07 00:00:00', 3); Easy - Level easy questions - https://youtube.com/playlist?list=PLP8zk3fCtbPIRr92ZlRnw6H__IgWQdetg&si=-HgJ2ZeVg1IL35f3 #sqlserver #dataanalytics #dataanalyst #sqlqueries #data #sqlqueryinterviewquestionsandanswers #faang #twitter #sql

Download

1 formats

Video Formats

360pmp425.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Twitter SQL Interview Question | Three Days Rolling Average | using Window Function & Self Join | NatokHD