Skip to content

Latest commit

 

History

History
172 lines (148 loc) · 36.9 KB

File metadata and controls

172 lines (148 loc) · 36.9 KB




Description

The compiled solutions encompass all SQL questions, ranging from Medium to Hard, on Stratascratch, with majority of focus on Hard problems.

These solutions were executed on the integrated PostgreSQL environment.

Solution Table

In the below tables, the columns indicate the following attributes related to the weekly challenge:

  • ID : Identity column for individual challenge

  • Challenge : Link to the SQL challenge hosted on Stratascratch

  • Solution Script : Link to the solution SQL script hosted in this repository.

List of Questions

Difficulty : Hard 🔴 (119/119)

Sr. ID Title Solution Link
1 514 Marketing Campaign Success [Advanced] Solution
2 2007 Rank Variance Per Country Solution
3 2008 The Cheapest Airline Connection Solution
4 2012 Viewers Turned Streamers Solution
5 2028 New And Existing Users Solution
6 2029 The Most Popular Client_Id Solution
7 2033 Find The Most Profitable Location Solution
8 2036 Lowest Revenue Generated Restaurants Solution
9 2037 Delivering and Placing Orders Solution
10 2044 Most Senior & Junior Employee Solution
11 2046 Maximum Number of Employees Reached Solution
12 2053 Retention Rate Solution
13 2054 Consecutive Days Solution
14 2059 Player with Longest Streak Solution
15 2073 Popular Posts Solution
16 2076 Trips in Consecutive Months Solution
17 2078 From Microsoft to Google Solution
18 2082 Minimum Number of Platforms Solution
19 2087 Negative Reviews in New Locations Solution
20 2088 Seat Availability Solution
21 2089 Cookbook Recipes Solution
22 2090 First Day Retention Rate Solution
23 2094 Highest Earning Merchants Solution
24 2103 Reviewed flags of top videos Solution
25 2105 Videos Removed on Latest Date Solution
26 2111 Sales Growth per Territory Solution
27 2112 Product Market Share Solution
28 2115 More Than 100 Dollars Solution
29 2123 Product Families Solution
30 2131 User Streaks Solution
31 2136 Customer Tracking Solution
32 2146 Department Manager and Employee Salary Comparison Solution
33 9603 Titanic Fare differences Solution
34 9606 Differences In Movie Ratings Solution
35 9608 Exclusive Amazon Products Solution
36 9612 Keywords From Yelp Reviews Solution
37 9632 Host Popularity Rental Prices Solution
38 9633 City With Most Amenities Solution
39 9701 3rd Most Reported Health Issues Solution
40 9708 Variance and the Standard Deviation of scores Solution
41 9711 Facilities With Lots Of Inspections Solution
42 9716 Top 3 Facilities Solution
43 9734 Number Of Inspections By Zip Solution
44 9736 Highest Number Of High-risk Violations Solution
45 9739 Worst Businesses Solution
46 9741 Inspection Scores For Businesses Solution
47 9763 Most Popular Room Types Solution
48 9776 Common Interests Amongst Users Solution
49 9784 Time Between Two Events Solution
50 9790 Processed and Not-Processed complaints of each type Solution
51 9791 Views Per Keyword Solution
52 9793 Average Time Between Steps Solution
53 9794 Words With Two Vowels Solution
54 9814 Counting Instances in Text Solution
55 9815 Price Of A Handyman Solution
56 9816 List of intersections between both word lists Solution
57 9818 File Contents Shuffle Solution
58 9821 Common Friends Friend Solution
59 9822 Average Number of Friends Solution
60 9823 Common Letters Solution
61 9883 Find the oldest survivor per passenger class Solution
62 9898 Distinct Salaries Solution
63 9900 Median Salary Solution
64 9919 Unique Highest Salary Solution
65 9952 Name to Medal Connection Solution
66 9953 Olympics Gender Ratio Solution
67 9955 Norwegian Alpine Skiers Solution
68 9957 Olympics average male height Solution
69 9960 Top Teams In The Rio De Janeiro 2016 Olympics Solution
70 9966 Quarterback With The Longest Throw Solution
71 9979 Top 5 highest & lowest paid employees Solution
72 9981 Employees Without Benefits Solution
73 9983 Median Job Salaries Solution
74 9985 Above Average But Not At The Top Solution
75 9986 Top 5 least paid employees for each job title Solution
76 9989 Highest Paid City Employees Solution
77 10013 Positive Ad Channels Solution
78 10017 Year Over Year Churn Solution
79 10018 Lyft Driver Salary And Service Tenure Solution
80 10019 Percentage of rides for each weather and the hour Solution
81 10037 Favourite Wine Variety Solution
82 10040 Wines Dataset Solution
83 10041 Most Expensive And Cheapest Wine Solution
84 10042 Top 3 Wineries In The World Solution
85 10043 Median Price Of Wines Solution
86 10045 Points Rating Of Wines Over Time Solution
87 10046 Top 5 States With 5 Star Businesses Solution
88 10062 Fans vs Opposition Solution
89 10067 Google Fit User Tracking Solution
90 10069 Correlation Between E-mails And Activity Time Solution
91 10081 Employee Bonus problem Solution
92 10084 Cum Sum Energy Consumption Solution
93 10131 Business Name Lengths Solution
94 10171 Genre with most Oscar Winnings Solution
95 10172 Best Selling Item Solution
96 10173 Days At Number One Solution
97 10284 Popularity Percentage Solution
98 10297 Comments Distribution Solution
99 10300 Premium vs Freemium Solution
100 10302 Distance Per Dollar Solution
101 10303 Top Percentile Fraud Solution
102 10313 Naive Forecasting Solution
103 10314 Revenue Over Time Solution
104 10319 Monthly Percentage Difference Solution
105 10350 Algorithm Performance Solution
106 2038 WFM Brand Segmentation based on Customer Activity Solution
107 2134 Completed Trip within 168 Hours Solution
108 2147 Most Expensive And Cheapest Wine With Ties Solution
109 2165 Sales Percentage Week's Beginning and End Solution
110 9637 Growth of Airbnb Solution
111 9713 Find the scores of 4 quartiles of each company Solution
112 9714 Dates Of Inspection Solution
113 9918 Arizona, California, and Hawaii Employees Solution
114 9959 Olympic Medals By Chinese Athletes Solution
115 9977 Find the number of public-service employees Solution
116 10145 Make a pivot table to find the highest payment Solution
117 10355 Employees with Same Birth Month Solution
118 10358 Friday Purchases Solution
119 10369 Spotify Penetration Testing Solution

References

Contributing

Contributions are always welcome !!

If you would like to contribute to the project, please fork the repository and make a pull request.

Support

If you have any doubts, queries or, suggestions then, please connect with me on LinkedIn.

Do ⭐ the repository, if it inspired you, gave you ideas of your own or helped you in any way !!