├── .gitignore ├── Anti_Patterns ├── 01_Ambiguous_Group │ └── README.md ├── 02_Bad_Subquery │ └── README.md └── 03_Fail_to_Use_Index │ └── README.md ├── Hacks ├── 01_Random_Sampling │ ├── README.md │ └── solution.sql ├── 02_NULL_pathology │ ├── README.md │ └── db.sql ├── 03_Full_Join │ ├── README.md │ └── db.sql ├── 04_Dynamic_Query │ ├── README.md │ └── dynamic.ipynb ├── 05_Stored_Precesure │ ├── README.md │ └── stored_procedure.sql ├── 06_Hacking_Aggregation │ ├── README.md │ └── solution.sql ├── 07_Multi_Column_Partition │ ├── README.md │ ├── db.sql │ └── use_case.sql └── 08_pandasql │ ├── customers.csv │ └── pandasql.ipynb ├── Interview ├── 01_Facebook_Advertiser_Status │ ├── README.md │ ├── db.sql │ ├── fig │ │ └── transition.png │ └── solution.sql ├── 02_Spotify_Listening_History │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 03_Monthly_Active_User │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 04_Page_Recommendation │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 05_Pivoting_Numeric_Data │ ├── Expenses.sql │ ├── README.md │ ├── db.sql │ └── pivot.sql ├── 06_Pivoting_Text_Data │ ├── README.md │ ├── db.sql │ └── pivot.sql ├── 07_Unpivoting_Tables │ ├── README.md │ ├── pivot_table.sql │ └── un_pivot_table.sql ├── 08_Group_by_Bins │ ├── README.md │ └── solution.sql ├── 09_Consecutive_Active_Users │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 10_Spotify_Recommend_Friend │ ├── README.md │ ├── db.sql │ ├── fig │ │ └── symmetry.png │ └── solution.sql ├── 11_Spotify_Similar_Friends │ ├── README.md │ ├── cartesian.txt │ └── solution.sql ├── 12_Invalid_Search │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 13_Text_Confirmation │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 14_Facebook_Common_Friend │ ├── README.md │ ├── db.sql │ └── solution.sql ├── 15_Facebook_People_You_May_Know │ ├── README.md │ └── solution.sql └── 16_Instagram_Common_Follower │ ├── README.md │ ├── db.sql │ └── solution.sql ├── LICENSE ├── LeetCode ├── 185_Department_Top_Three_Salaries │ ├── README.md │ ├── db.sql │ ├── mssql_pre_filter.sql │ ├── mssql_window.sql │ └── mysql_correlated_subquery.sql ├── 262_Trips_and_Users │ ├── README.md │ ├── db.sql │ ├── mysql_pre_filter.sql │ ├── mysql_set.sql │ └── mysql_simple.sql ├── 579_Find_Cumulative_Salary_of_an_Employee │ ├── README.md │ ├── db.sql │ ├── mssql_lag.sql │ ├── mysql_join_tmp_table.sql │ ├── mysql_set.sql │ └── mysql_single_join.sql ├── 601_Human_Traffic_of_Stadium │ ├── README.md │ ├── db.sql │ ├── mssql_pre_filter.sql │ ├── mssql_window.sql │ └── mysql_simple.sql ├── 615_Average_Salary │ ├── README.MD │ ├── db.sql │ └── mysql.sql ├── 618_Students_Report_by_Geography │ ├── README.md │ ├── db.sql │ ├── mssql_full_join.sql │ └── mysql_session_vars.sql └── others │ ├── 1045_Customers_Who_Bought_All_Products.sql │ ├── 1050_Actors_and_Directors_Who_Cooperated_At_Least_Three_Times.sql │ ├── 1068_Product_Sales_Analysis_I.sql │ ├── 1069_Product_Sales_Analysis_II.sql │ ├── 1070_Product_Sales_Analysis_III.sql │ ├── 1075_Project_Employees_I.sql │ ├── 1076_Project_Employees_II.sql │ ├── 1077_Project_Employees_III.sql │ ├── 1082_Sales_Analysis_I.sql │ ├── 1083_Sales_Analysis_II.sql │ ├── 1084_Sales_Analysis_III.sql │ ├── 1097_Game_Play_Analysis_V.sql │ ├── 1098_Unpopular_Books.sql │ ├── 1107_New_Users_Daily_Count.sql │ ├── 1112_Highest_Grade_For_Each_Student.sql │ ├── 1113_Reported_Posts.sql │ ├── 1126_Active_Businesses.sql │ ├── 1127_User_Purchase_Platform.sql │ ├── 1132_Reported_Posts_II.sql │ ├── 1141_User_Activity_for_the_Past_30_Days_I.sql │ ├── 1142_User_Activity_for_the_Past_30_Days_II.sql │ ├── 1148_Article_Views_I.sql │ ├── 1149_Article_Views_II.sql │ ├── 1158_Market_Analysis_I.sql │ ├── 1159_Market_Analysis_II.sql │ ├── 1164_Product_Price_at_a_Given_Date.sql │ ├── 1173_Immediate_Food_Delivery_I.sql │ ├── 1174_Immediate_Food_Delivery_II.sql │ ├── 1179_Reformat_Department_Table.sql │ ├── 175_Combine_Two_Tables.sql │ ├── 176_Second_Highest_Salary.sql │ ├── 177_Nth_Highest_Salary.sql │ ├── 178_Rank_Scores.sql │ ├── 180_Consecutive_Numbers.sql │ ├── 181_Employees_Earning_More_Than_Their_Managers.sql │ ├── 182_Duplicate_Emails.sql │ ├── 183_Customers_Who_Never_Order.sql │ ├── 184_Department_Highest_Salary.sql │ ├── 185_Department_Top_Three_Salaries.sql │ ├── 196_Delete_Duplicate_Emails.sql │ ├── 197_Rising_Temperature.sql │ ├── 262_Trips_and_Users.sql │ ├── 569_Median_Employee_Salary.sql │ ├── 570_Managers_with_at_Least_5_Direct_Reports.sql │ ├── 571_Find_Median_Given_Frequency_of_Numbers.sql │ ├── 574_Winning_Candidate.sql │ ├── 577_Employee_Bonus.sql │ ├── 578_Get_Highest_Answer_Rate_Question.sql │ ├── 579_Find_Cumulative_Salary_of_an_Employee.sql │ ├── 580_Count_Student_Number_in_Departments.sql │ ├── 584_Find_Customer_Referee.sql │ ├── 585_Investments_in_2016.sql │ ├── 586_Customer_Placing_the_Largest_Number_of_Orders.sql │ ├── 595_Big_Countries.sql │ ├── 596_Classes_More_Than_5_Students.sql │ ├── 597_Friend_Requests_I-_Overall_Acceptance_Rate.sql │ ├── 601_Human_Traffic_of_Stadium.sql │ ├── 602_Friend_Requests_II-_Who_Has_the_Most_Friends.sql │ ├── 603_Consecutive_Available_Seats.sql │ ├── 607_Sales_Person.sql │ ├── 608_Tree_Node.sql │ ├── 610_Triangle_Judgement.sql │ ├── 612_Shortest_Distance_in_a_Plane.sql │ ├── 613_Shortest_Distance_in_a_Line.sql │ ├── 614_Second_Degree_Follower.sql │ ├── 615_Average_Salary_Departments_VS_Company.sql │ ├── 618_Students_Report_By_Geography.sql │ ├── 619_Biggest_Single_Number.sql │ ├── 620_Not_Boring_Movies.sql │ ├── 626_Exchange_Seats.sql │ └── 627_Swap_Salary.sql ├── README.md ├── assets └── sql_order.png └── databases ├── classicmodels └── mysqlsampledatabase.sql ├── practice.sql ├── sakila-db ├── sakila-data.sql └── sakila-schema.sql └── world_db ├── README.txt └── world.sql /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .ipynb_checkpoints/ 3 | archive/ -------------------------------------------------------------------------------- /Anti_Patterns/01_Ambiguous_Group/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Anti_Patterns/01_Ambiguous_Group/README.md -------------------------------------------------------------------------------- /Anti_Patterns/02_Bad_Subquery/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Anti_Patterns/02_Bad_Subquery/README.md -------------------------------------------------------------------------------- /Anti_Patterns/03_Fail_to_Use_Index/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Anti_Patterns/03_Fail_to_Use_Index/README.md -------------------------------------------------------------------------------- /Hacks/01_Random_Sampling/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/01_Random_Sampling/README.md -------------------------------------------------------------------------------- /Hacks/01_Random_Sampling/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/01_Random_Sampling/solution.sql -------------------------------------------------------------------------------- /Hacks/02_NULL_pathology/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/02_NULL_pathology/README.md -------------------------------------------------------------------------------- /Hacks/02_NULL_pathology/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/02_NULL_pathology/db.sql -------------------------------------------------------------------------------- /Hacks/03_Full_Join/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/03_Full_Join/README.md -------------------------------------------------------------------------------- /Hacks/03_Full_Join/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/03_Full_Join/db.sql -------------------------------------------------------------------------------- /Hacks/04_Dynamic_Query/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/04_Dynamic_Query/README.md -------------------------------------------------------------------------------- /Hacks/04_Dynamic_Query/dynamic.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/04_Dynamic_Query/dynamic.ipynb -------------------------------------------------------------------------------- /Hacks/05_Stored_Precesure/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/05_Stored_Precesure/README.md -------------------------------------------------------------------------------- /Hacks/05_Stored_Precesure/stored_procedure.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/05_Stored_Precesure/stored_procedure.sql -------------------------------------------------------------------------------- /Hacks/06_Hacking_Aggregation/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/06_Hacking_Aggregation/README.md -------------------------------------------------------------------------------- /Hacks/06_Hacking_Aggregation/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/06_Hacking_Aggregation/solution.sql -------------------------------------------------------------------------------- /Hacks/07_Multi_Column_Partition/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/07_Multi_Column_Partition/README.md -------------------------------------------------------------------------------- /Hacks/07_Multi_Column_Partition/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/07_Multi_Column_Partition/db.sql -------------------------------------------------------------------------------- /Hacks/07_Multi_Column_Partition/use_case.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/07_Multi_Column_Partition/use_case.sql -------------------------------------------------------------------------------- /Hacks/08_pandasql/customers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/08_pandasql/customers.csv -------------------------------------------------------------------------------- /Hacks/08_pandasql/pandasql.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Hacks/08_pandasql/pandasql.ipynb -------------------------------------------------------------------------------- /Interview/01_Facebook_Advertiser_Status/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/01_Facebook_Advertiser_Status/README.md -------------------------------------------------------------------------------- /Interview/01_Facebook_Advertiser_Status/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/01_Facebook_Advertiser_Status/db.sql -------------------------------------------------------------------------------- /Interview/01_Facebook_Advertiser_Status/fig/transition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/01_Facebook_Advertiser_Status/fig/transition.png -------------------------------------------------------------------------------- /Interview/01_Facebook_Advertiser_Status/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/01_Facebook_Advertiser_Status/solution.sql -------------------------------------------------------------------------------- /Interview/02_Spotify_Listening_History/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/02_Spotify_Listening_History/README.md -------------------------------------------------------------------------------- /Interview/02_Spotify_Listening_History/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/02_Spotify_Listening_History/db.sql -------------------------------------------------------------------------------- /Interview/02_Spotify_Listening_History/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/02_Spotify_Listening_History/solution.sql -------------------------------------------------------------------------------- /Interview/03_Monthly_Active_User/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/03_Monthly_Active_User/README.md -------------------------------------------------------------------------------- /Interview/03_Monthly_Active_User/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/03_Monthly_Active_User/db.sql -------------------------------------------------------------------------------- /Interview/03_Monthly_Active_User/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/03_Monthly_Active_User/solution.sql -------------------------------------------------------------------------------- /Interview/04_Page_Recommendation/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/04_Page_Recommendation/README.md -------------------------------------------------------------------------------- /Interview/04_Page_Recommendation/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/04_Page_Recommendation/db.sql -------------------------------------------------------------------------------- /Interview/04_Page_Recommendation/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/04_Page_Recommendation/solution.sql -------------------------------------------------------------------------------- /Interview/05_Pivoting_Numeric_Data/Expenses.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/05_Pivoting_Numeric_Data/Expenses.sql -------------------------------------------------------------------------------- /Interview/05_Pivoting_Numeric_Data/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/05_Pivoting_Numeric_Data/README.md -------------------------------------------------------------------------------- /Interview/05_Pivoting_Numeric_Data/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/05_Pivoting_Numeric_Data/db.sql -------------------------------------------------------------------------------- /Interview/05_Pivoting_Numeric_Data/pivot.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/05_Pivoting_Numeric_Data/pivot.sql -------------------------------------------------------------------------------- /Interview/06_Pivoting_Text_Data/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/06_Pivoting_Text_Data/README.md -------------------------------------------------------------------------------- /Interview/06_Pivoting_Text_Data/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/06_Pivoting_Text_Data/db.sql -------------------------------------------------------------------------------- /Interview/06_Pivoting_Text_Data/pivot.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/06_Pivoting_Text_Data/pivot.sql -------------------------------------------------------------------------------- /Interview/07_Unpivoting_Tables/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/07_Unpivoting_Tables/README.md -------------------------------------------------------------------------------- /Interview/07_Unpivoting_Tables/pivot_table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/07_Unpivoting_Tables/pivot_table.sql -------------------------------------------------------------------------------- /Interview/07_Unpivoting_Tables/un_pivot_table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/07_Unpivoting_Tables/un_pivot_table.sql -------------------------------------------------------------------------------- /Interview/08_Group_by_Bins/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/08_Group_by_Bins/README.md -------------------------------------------------------------------------------- /Interview/08_Group_by_Bins/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/08_Group_by_Bins/solution.sql -------------------------------------------------------------------------------- /Interview/09_Consecutive_Active_Users/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/09_Consecutive_Active_Users/README.md -------------------------------------------------------------------------------- /Interview/09_Consecutive_Active_Users/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/09_Consecutive_Active_Users/db.sql -------------------------------------------------------------------------------- /Interview/09_Consecutive_Active_Users/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/09_Consecutive_Active_Users/solution.sql -------------------------------------------------------------------------------- /Interview/10_Spotify_Recommend_Friend/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/10_Spotify_Recommend_Friend/README.md -------------------------------------------------------------------------------- /Interview/10_Spotify_Recommend_Friend/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/10_Spotify_Recommend_Friend/db.sql -------------------------------------------------------------------------------- /Interview/10_Spotify_Recommend_Friend/fig/symmetry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/10_Spotify_Recommend_Friend/fig/symmetry.png -------------------------------------------------------------------------------- /Interview/10_Spotify_Recommend_Friend/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/10_Spotify_Recommend_Friend/solution.sql -------------------------------------------------------------------------------- /Interview/11_Spotify_Similar_Friends/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/11_Spotify_Similar_Friends/README.md -------------------------------------------------------------------------------- /Interview/11_Spotify_Similar_Friends/cartesian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/11_Spotify_Similar_Friends/cartesian.txt -------------------------------------------------------------------------------- /Interview/11_Spotify_Similar_Friends/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/11_Spotify_Similar_Friends/solution.sql -------------------------------------------------------------------------------- /Interview/12_Invalid_Search/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/12_Invalid_Search/README.md -------------------------------------------------------------------------------- /Interview/12_Invalid_Search/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/12_Invalid_Search/db.sql -------------------------------------------------------------------------------- /Interview/12_Invalid_Search/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/12_Invalid_Search/solution.sql -------------------------------------------------------------------------------- /Interview/13_Text_Confirmation/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/13_Text_Confirmation/README.md -------------------------------------------------------------------------------- /Interview/13_Text_Confirmation/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/13_Text_Confirmation/db.sql -------------------------------------------------------------------------------- /Interview/13_Text_Confirmation/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/13_Text_Confirmation/solution.sql -------------------------------------------------------------------------------- /Interview/14_Facebook_Common_Friend/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/14_Facebook_Common_Friend/README.md -------------------------------------------------------------------------------- /Interview/14_Facebook_Common_Friend/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/14_Facebook_Common_Friend/db.sql -------------------------------------------------------------------------------- /Interview/14_Facebook_Common_Friend/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/14_Facebook_Common_Friend/solution.sql -------------------------------------------------------------------------------- /Interview/15_Facebook_People_You_May_Know/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/15_Facebook_People_You_May_Know/README.md -------------------------------------------------------------------------------- /Interview/15_Facebook_People_You_May_Know/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/15_Facebook_People_You_May_Know/solution.sql -------------------------------------------------------------------------------- /Interview/16_Instagram_Common_Follower/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/16_Instagram_Common_Follower/README.md -------------------------------------------------------------------------------- /Interview/16_Instagram_Common_Follower/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/16_Instagram_Common_Follower/db.sql -------------------------------------------------------------------------------- /Interview/16_Instagram_Common_Follower/solution.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/Interview/16_Instagram_Common_Follower/solution.sql -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LICENSE -------------------------------------------------------------------------------- /LeetCode/185_Department_Top_Three_Salaries/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/185_Department_Top_Three_Salaries/README.md -------------------------------------------------------------------------------- /LeetCode/185_Department_Top_Three_Salaries/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/185_Department_Top_Three_Salaries/db.sql -------------------------------------------------------------------------------- /LeetCode/185_Department_Top_Three_Salaries/mssql_pre_filter.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/185_Department_Top_Three_Salaries/mssql_pre_filter.sql -------------------------------------------------------------------------------- /LeetCode/185_Department_Top_Three_Salaries/mssql_window.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/185_Department_Top_Three_Salaries/mssql_window.sql -------------------------------------------------------------------------------- /LeetCode/185_Department_Top_Three_Salaries/mysql_correlated_subquery.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/185_Department_Top_Three_Salaries/mysql_correlated_subquery.sql -------------------------------------------------------------------------------- /LeetCode/262_Trips_and_Users/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/262_Trips_and_Users/README.md -------------------------------------------------------------------------------- /LeetCode/262_Trips_and_Users/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/262_Trips_and_Users/db.sql -------------------------------------------------------------------------------- /LeetCode/262_Trips_and_Users/mysql_pre_filter.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/262_Trips_and_Users/mysql_pre_filter.sql -------------------------------------------------------------------------------- /LeetCode/262_Trips_and_Users/mysql_set.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/262_Trips_and_Users/mysql_set.sql -------------------------------------------------------------------------------- /LeetCode/262_Trips_and_Users/mysql_simple.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/262_Trips_and_Users/mysql_simple.sql -------------------------------------------------------------------------------- /LeetCode/579_Find_Cumulative_Salary_of_an_Employee/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/README.md -------------------------------------------------------------------------------- /LeetCode/579_Find_Cumulative_Salary_of_an_Employee/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/db.sql -------------------------------------------------------------------------------- /LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mssql_lag.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mssql_lag.sql -------------------------------------------------------------------------------- /LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mysql_join_tmp_table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mysql_join_tmp_table.sql -------------------------------------------------------------------------------- /LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mysql_set.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mysql_set.sql -------------------------------------------------------------------------------- /LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mysql_single_join.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mysql_single_join.sql -------------------------------------------------------------------------------- /LeetCode/601_Human_Traffic_of_Stadium/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/601_Human_Traffic_of_Stadium/README.md -------------------------------------------------------------------------------- /LeetCode/601_Human_Traffic_of_Stadium/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/601_Human_Traffic_of_Stadium/db.sql -------------------------------------------------------------------------------- /LeetCode/601_Human_Traffic_of_Stadium/mssql_pre_filter.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/601_Human_Traffic_of_Stadium/mssql_pre_filter.sql -------------------------------------------------------------------------------- /LeetCode/601_Human_Traffic_of_Stadium/mssql_window.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/601_Human_Traffic_of_Stadium/mssql_window.sql -------------------------------------------------------------------------------- /LeetCode/601_Human_Traffic_of_Stadium/mysql_simple.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/601_Human_Traffic_of_Stadium/mysql_simple.sql -------------------------------------------------------------------------------- /LeetCode/615_Average_Salary/README.MD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/615_Average_Salary/README.MD -------------------------------------------------------------------------------- /LeetCode/615_Average_Salary/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/615_Average_Salary/db.sql -------------------------------------------------------------------------------- /LeetCode/615_Average_Salary/mysql.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/615_Average_Salary/mysql.sql -------------------------------------------------------------------------------- /LeetCode/618_Students_Report_by_Geography/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/618_Students_Report_by_Geography/README.md -------------------------------------------------------------------------------- /LeetCode/618_Students_Report_by_Geography/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/618_Students_Report_by_Geography/db.sql -------------------------------------------------------------------------------- /LeetCode/618_Students_Report_by_Geography/mssql_full_join.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/618_Students_Report_by_Geography/mssql_full_join.sql -------------------------------------------------------------------------------- /LeetCode/618_Students_Report_by_Geography/mysql_session_vars.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/618_Students_Report_by_Geography/mysql_session_vars.sql -------------------------------------------------------------------------------- /LeetCode/others/1045_Customers_Who_Bought_All_Products.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1045_Customers_Who_Bought_All_Products.sql -------------------------------------------------------------------------------- /LeetCode/others/1050_Actors_and_Directors_Who_Cooperated_At_Least_Three_Times.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1050_Actors_and_Directors_Who_Cooperated_At_Least_Three_Times.sql -------------------------------------------------------------------------------- /LeetCode/others/1068_Product_Sales_Analysis_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1068_Product_Sales_Analysis_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1069_Product_Sales_Analysis_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1069_Product_Sales_Analysis_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1070_Product_Sales_Analysis_III.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1070_Product_Sales_Analysis_III.sql -------------------------------------------------------------------------------- /LeetCode/others/1075_Project_Employees_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1075_Project_Employees_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1076_Project_Employees_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1076_Project_Employees_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1077_Project_Employees_III.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1077_Project_Employees_III.sql -------------------------------------------------------------------------------- /LeetCode/others/1082_Sales_Analysis_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1082_Sales_Analysis_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1083_Sales_Analysis_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1083_Sales_Analysis_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1084_Sales_Analysis_III.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1084_Sales_Analysis_III.sql -------------------------------------------------------------------------------- /LeetCode/others/1097_Game_Play_Analysis_V.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1097_Game_Play_Analysis_V.sql -------------------------------------------------------------------------------- /LeetCode/others/1098_Unpopular_Books.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1098_Unpopular_Books.sql -------------------------------------------------------------------------------- /LeetCode/others/1107_New_Users_Daily_Count.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1107_New_Users_Daily_Count.sql -------------------------------------------------------------------------------- /LeetCode/others/1112_Highest_Grade_For_Each_Student.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1112_Highest_Grade_For_Each_Student.sql -------------------------------------------------------------------------------- /LeetCode/others/1113_Reported_Posts.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1113_Reported_Posts.sql -------------------------------------------------------------------------------- /LeetCode/others/1126_Active_Businesses.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1126_Active_Businesses.sql -------------------------------------------------------------------------------- /LeetCode/others/1127_User_Purchase_Platform.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1127_User_Purchase_Platform.sql -------------------------------------------------------------------------------- /LeetCode/others/1132_Reported_Posts_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1132_Reported_Posts_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1141_User_Activity_for_the_Past_30_Days_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1141_User_Activity_for_the_Past_30_Days_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1142_User_Activity_for_the_Past_30_Days_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1142_User_Activity_for_the_Past_30_Days_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1148_Article_Views_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1148_Article_Views_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1149_Article_Views_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1149_Article_Views_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1158_Market_Analysis_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1158_Market_Analysis_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1159_Market_Analysis_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1159_Market_Analysis_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1164_Product_Price_at_a_Given_Date.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1164_Product_Price_at_a_Given_Date.sql -------------------------------------------------------------------------------- /LeetCode/others/1173_Immediate_Food_Delivery_I.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1173_Immediate_Food_Delivery_I.sql -------------------------------------------------------------------------------- /LeetCode/others/1174_Immediate_Food_Delivery_II.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1174_Immediate_Food_Delivery_II.sql -------------------------------------------------------------------------------- /LeetCode/others/1179_Reformat_Department_Table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/1179_Reformat_Department_Table.sql -------------------------------------------------------------------------------- /LeetCode/others/175_Combine_Two_Tables.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/175_Combine_Two_Tables.sql -------------------------------------------------------------------------------- /LeetCode/others/176_Second_Highest_Salary.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/176_Second_Highest_Salary.sql -------------------------------------------------------------------------------- /LeetCode/others/177_Nth_Highest_Salary.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/177_Nth_Highest_Salary.sql -------------------------------------------------------------------------------- /LeetCode/others/178_Rank_Scores.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/178_Rank_Scores.sql -------------------------------------------------------------------------------- /LeetCode/others/180_Consecutive_Numbers.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/180_Consecutive_Numbers.sql -------------------------------------------------------------------------------- /LeetCode/others/181_Employees_Earning_More_Than_Their_Managers.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/181_Employees_Earning_More_Than_Their_Managers.sql -------------------------------------------------------------------------------- /LeetCode/others/182_Duplicate_Emails.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/182_Duplicate_Emails.sql -------------------------------------------------------------------------------- /LeetCode/others/183_Customers_Who_Never_Order.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/183_Customers_Who_Never_Order.sql -------------------------------------------------------------------------------- /LeetCode/others/184_Department_Highest_Salary.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/184_Department_Highest_Salary.sql -------------------------------------------------------------------------------- /LeetCode/others/185_Department_Top_Three_Salaries.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/185_Department_Top_Three_Salaries.sql -------------------------------------------------------------------------------- /LeetCode/others/196_Delete_Duplicate_Emails.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/196_Delete_Duplicate_Emails.sql -------------------------------------------------------------------------------- /LeetCode/others/197_Rising_Temperature.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/197_Rising_Temperature.sql -------------------------------------------------------------------------------- /LeetCode/others/262_Trips_and_Users.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/262_Trips_and_Users.sql -------------------------------------------------------------------------------- /LeetCode/others/569_Median_Employee_Salary.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/569_Median_Employee_Salary.sql -------------------------------------------------------------------------------- /LeetCode/others/570_Managers_with_at_Least_5_Direct_Reports.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/570_Managers_with_at_Least_5_Direct_Reports.sql -------------------------------------------------------------------------------- /LeetCode/others/571_Find_Median_Given_Frequency_of_Numbers.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/571_Find_Median_Given_Frequency_of_Numbers.sql -------------------------------------------------------------------------------- /LeetCode/others/574_Winning_Candidate.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/574_Winning_Candidate.sql -------------------------------------------------------------------------------- /LeetCode/others/577_Employee_Bonus.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/577_Employee_Bonus.sql -------------------------------------------------------------------------------- /LeetCode/others/578_Get_Highest_Answer_Rate_Question.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/578_Get_Highest_Answer_Rate_Question.sql -------------------------------------------------------------------------------- /LeetCode/others/579_Find_Cumulative_Salary_of_an_Employee.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/579_Find_Cumulative_Salary_of_an_Employee.sql -------------------------------------------------------------------------------- /LeetCode/others/580_Count_Student_Number_in_Departments.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/580_Count_Student_Number_in_Departments.sql -------------------------------------------------------------------------------- /LeetCode/others/584_Find_Customer_Referee.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/584_Find_Customer_Referee.sql -------------------------------------------------------------------------------- /LeetCode/others/585_Investments_in_2016.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/585_Investments_in_2016.sql -------------------------------------------------------------------------------- /LeetCode/others/586_Customer_Placing_the_Largest_Number_of_Orders.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/586_Customer_Placing_the_Largest_Number_of_Orders.sql -------------------------------------------------------------------------------- /LeetCode/others/595_Big_Countries.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/595_Big_Countries.sql -------------------------------------------------------------------------------- /LeetCode/others/596_Classes_More_Than_5_Students.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/596_Classes_More_Than_5_Students.sql -------------------------------------------------------------------------------- /LeetCode/others/597_Friend_Requests_I-_Overall_Acceptance_Rate.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/597_Friend_Requests_I-_Overall_Acceptance_Rate.sql -------------------------------------------------------------------------------- /LeetCode/others/601_Human_Traffic_of_Stadium.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/601_Human_Traffic_of_Stadium.sql -------------------------------------------------------------------------------- /LeetCode/others/602_Friend_Requests_II-_Who_Has_the_Most_Friends.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/602_Friend_Requests_II-_Who_Has_the_Most_Friends.sql -------------------------------------------------------------------------------- /LeetCode/others/603_Consecutive_Available_Seats.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/603_Consecutive_Available_Seats.sql -------------------------------------------------------------------------------- /LeetCode/others/607_Sales_Person.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/607_Sales_Person.sql -------------------------------------------------------------------------------- /LeetCode/others/608_Tree_Node.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/608_Tree_Node.sql -------------------------------------------------------------------------------- /LeetCode/others/610_Triangle_Judgement.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/610_Triangle_Judgement.sql -------------------------------------------------------------------------------- /LeetCode/others/612_Shortest_Distance_in_a_Plane.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/612_Shortest_Distance_in_a_Plane.sql -------------------------------------------------------------------------------- /LeetCode/others/613_Shortest_Distance_in_a_Line.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/613_Shortest_Distance_in_a_Line.sql -------------------------------------------------------------------------------- /LeetCode/others/614_Second_Degree_Follower.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/614_Second_Degree_Follower.sql -------------------------------------------------------------------------------- /LeetCode/others/615_Average_Salary_Departments_VS_Company.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/615_Average_Salary_Departments_VS_Company.sql -------------------------------------------------------------------------------- /LeetCode/others/618_Students_Report_By_Geography.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/618_Students_Report_By_Geography.sql -------------------------------------------------------------------------------- /LeetCode/others/619_Biggest_Single_Number.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/619_Biggest_Single_Number.sql -------------------------------------------------------------------------------- /LeetCode/others/620_Not_Boring_Movies.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/620_Not_Boring_Movies.sql -------------------------------------------------------------------------------- /LeetCode/others/626_Exchange_Seats.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/626_Exchange_Seats.sql -------------------------------------------------------------------------------- /LeetCode/others/627_Swap_Salary.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/LeetCode/others/627_Swap_Salary.sql -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Created with ❤ by Nitesh 2 | -------------------------------------------------------------------------------- /assets/sql_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/assets/sql_order.png -------------------------------------------------------------------------------- /databases/classicmodels/mysqlsampledatabase.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/databases/classicmodels/mysqlsampledatabase.sql -------------------------------------------------------------------------------- /databases/practice.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/databases/practice.sql -------------------------------------------------------------------------------- /databases/sakila-db/sakila-data.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/databases/sakila-db/sakila-data.sql -------------------------------------------------------------------------------- /databases/sakila-db/sakila-schema.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/databases/sakila-db/sakila-schema.sql -------------------------------------------------------------------------------- /databases/world_db/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/databases/world_db/README.txt -------------------------------------------------------------------------------- /databases/world_db/world.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIteshx2/AdvancedSQL_Interview/HEAD/databases/world_db/world.sql --------------------------------------------------------------------------------