Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/mdh266/SQL-Practice

Solutions to Problems For SQL on Leetcode, Hackerrank & DataLemur
https://github.com/mdh266/SQL-Practice

datalemur datalemur-solutions hackerrank hackerrank-solutions hackerrank-sql leetcode leetcode-practice leetcode-questions leetcode-solutions sql sql-practice sql-query sqlzoo sqlzoo-solutions

Last synced: 16 days ago
JSON representation

Solutions to Problems For SQL on Leetcode, Hackerrank & DataLemur

Lists

README

        

# Practice SQL Scripts From Interview Prep Websites
------------

These are scripts that answer questions from leetcode, DataLemur, hackerank and sqlzoo. Links to questions and my answers are below!

## LeetCode
-----------

| Question | Answer |
|-------------------------|------------------------:|
| Employees earn more than their managers | Solution |
| Second highest salaries | Solution |
| Customers who never order | Solution |
| Duplicate Emails | Solution |
|[Rising Temperatures](https://leetcode.com/problems/rising-temperature) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/RisingTemperatures.sql) |
|[Department Top Three Salaries](https://leetcode.com/problems/department-top-three-salaries/submissions/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/Top3DeptSalaries.sql) |
|[N-th Highest Salary](https://leetcode.com/problems/nth-highest-salary/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/NthHighestSalary.sql)|
|[Department Highest Salary](https://leetcode.com/problems/department-highest-salary/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/DeptHighestSalary.sql) |
| [Monthly Transactions I](https://leetcode.com/problems/monthly-transactions-i/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/monthly-transactions-i.sql) |
| [Managers with at Least 5 Direct Reports](https://leetcode.com/problems/managers-with-at-least-5-direct-reports/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/managers-with-at-least-5-direct-reports.sql) |
| [Rank Scores](https://leetcode.com/problems/rank-scores/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/RankScores.sql) |
| [Not Boring Movies](https://leetcode.com/problems/not-boring-movies/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/notboringmovies.sql)|
| [Exchange Seats](https://leetcode.com/problems/exchange-seats/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/exchange-seats.sql)|
| [Consecutive Numbers](https://leetcode.com/problems/consecutive-numbers/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/ConsecutiveNumbers.sql)|
| [Human Traffice Of Stadium](https://leetcode.com/problems/human-traffic-of-stadium/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/HumanTrafficStadium.sql) |
| [Trips and Users](https://leetcode.com/problems/trips-and-users/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/trips_and_users.sql) |
|[Capital Gains/Loss](https://leetcode.com/problems/capital-gainloss/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/capital-gainloss.sql) |
|[Market Analysis I](https://leetcode.com/problems/market-analysis-i/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/market-analysis-i.sql) |
|[Tree Node](https://leetcode.com/problems/tree-node/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/tree-node.sql) |
| [Restaurant Growth](https://leetcode.com/problems/restaurant-growth/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/restaurant-growth.sql) |
| [Game Play Analysis I](https://leetcode.com/problems/game-play-analysis-i/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/game-play-analysis-i.sql) |
| [Game Play Analysis IV](https://leetcode.com/problems/game-play-analysis-iv/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/game-play-analysis-iv.sql) |
| [Investments In 2016](https://leetcode.com/problems/investments-in-2016/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/investments-in-2016.sql) |

## DataLemur
---------------
| Question | Answer |
|-------------------------|------------------------:|
|[Laptop vs. Mobile Viewership](https://datalemur.com/questions/laptop-mobile-viewership/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/laptop-mobile-viewership.sql) |
|[Average Review Ratings](https://datalemur.com/questions/sql-avg-review-ratings) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/sql-avg-review-ratings.sql) |
|[Matching Skills](https://datalemur.com/questions/matching-skills) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/matching-skills.sql) |
| [Odd and Even Measurements](https://datalemur.com/questions/odd-even-measurements) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/odd-even-measurements.sql) |
| [Y-on-Y Growth Rate](https://datalemur.com/questions/yoy-growth-rate) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/yoy-growth-rate.sql) |
| [Page With No Likes](https://datalemur.com/questions/sql-page-with-no-likes) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/sql-page-with-no-likes.sql) |
| [Frequently Purchased Pairs](https://datalemur.com/questions/frequently-purchased-pairs) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/frequently-purchased-pairs.sql) |
| [Supercloud Customer](https://datalemur.com/questions/supercloud-customer) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/supercloud-customer.sql) |
| [Sending vs. Opening Snap](https://datalemur.com/questions/time-spent-snaps) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/time-spent-snaps.sql) |
| [User's Third Transaction](https://datalemur.com/questions/sql-third-transaction) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/sql-third-transaction.sql) |
| [Repeated Payments](https://datalemur.com/questions/repeated-payments) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/repeated-payments.sql) |
| [Compressed Mode](https://datalemur.com/questions/alibaba-compressed-mode) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/alibaba-compressed-mode.sql) |
| [Signup Activation Rate](https://datalemur.com/questions/signup-confirmation-rate) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/signup-confirmation-rate.sql) |
| [Highest-Grossing Items](https://datalemur.com/questions/sql-highest-grossing) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/sql-highest-grossing.sql) |
| [Top 5 Artists](https://datalemur.com/questions/top-fans-rank.sql) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/top-fans-rank.sql) |
| [International Call Percentage](https://datalemur.com/questions/international-call-percentage) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/international-call-percentage.sql) |
| [Tweets' Rolling Average](https://datalemur.com/questions/rolling-average-tweets) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/rolling-average-tweetssql)

## Hacker Rank
---------------

| Question | Answer |
|-------------------------|------------------------:|
| [Japanese Cities](https://www.hackerrank.com/challenges/japanese-cities-attributes/problem) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/JapaneseCities.sql) |
| Earnings of employees | Solution |
| [Weather Observation Station 8](https://www.hackerrank.com/challenges/weather-observation-station-8/problem) | [Soluton](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/WeatherStation8.sql) |
| [Weather Observation Station 9](https://www.hackerrank.com/challenges/weather-observation-station-9/problem) | [Soluton](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/WeatherStation9.sql) |
| [More Than 75 Marks](https://www.hackerrank.com/challenges/more-than-75-marks/problem) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/MoreThan75Marks.sql) |
| [The Pads](https://www.hackerrank.com/challenges/the-pads/problem) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/ThePads.sql) |
| [Binary Search Tree 1](https://www.hackerrank.com/challenges/binary-search-tree-1/)| [Solution](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/binary-serach-tree1.sql) |

## SQLZoo
------------

| Question | Answer |
|-------------------------|------------------------:|
| Richer Than UK | Solution |
| Bigger Than Every Country In Europe | Solution |
| Neighbours of Argentina and Australia | Solution |
| Teams that have coach Fernando Santos | Solution |
| Busy years for John Travolta | Solution |