{"id":13622327,"url":"https://github.com/mdh266/SQL-Practice","last_synced_at":"2025-04-15T05:34:41.942Z","repository":{"id":53903250,"uuid":"103709037","full_name":"mdh266/SQL-Practice","owner":"mdh266","description":"Solutions to Problems For SQL on Leetcode, Hackerrank \u0026 DataLemur","archived":false,"fork":false,"pushed_at":"2024-08-03T21:06:35.000Z","size":42,"stargazers_count":234,"open_issues_count":0,"forks_count":78,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T18:29:13.381Z","etag":null,"topics":["datalemur","datalemur-solutions","hackerrank","hackerrank-solutions","hackerrank-sql","leetcode","leetcode-practice","leetcode-questions","leetcode-solutions","sql","sql-practice","sql-query","sqlzoo","sqlzoo-solutions"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdh266.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-15T23:15:30.000Z","updated_at":"2024-08-03T21:06:38.000Z","dependencies_parsed_at":"2023-12-19T01:02:08.537Z","dependency_job_id":"58b1787e-1e9c-4fe9-b9ea-f40b0687c160","html_url":"https://github.com/mdh266/SQL-Practice","commit_stats":{"total_commits":58,"total_committers":4,"mean_commits":14.5,"dds":0.2068965517241379,"last_synced_commit":"abb9f53f04913b906efd25fb7b45b0fb2a372047"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdh266%2FSQL-Practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdh266%2FSQL-Practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdh266%2FSQL-Practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdh266%2FSQL-Practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdh266","download_url":"https://codeload.github.com/mdh266/SQL-Practice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223661548,"owners_count":17181687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datalemur","datalemur-solutions","hackerrank","hackerrank-solutions","hackerrank-sql","leetcode","leetcode-practice","leetcode-questions","leetcode-solutions","sql","sql-practice","sql-query","sqlzoo","sqlzoo-solutions"],"created_at":"2024-08-01T21:01:17.677Z","updated_at":"2024-11-08T09:31:31.016Z","avatar_url":"https://github.com/mdh266.png","language":null,"readme":"# Practice SQL Scripts From Interview Prep Websites\n------------\n\nThese are scripts that answer questions from \u003ca href=\"https://leetcode.com\"\u003eleetcode\u003c/a\u003e, \u003ca href=\"https://datalemur.com/\"\u003eDataLemur\u003c/a\u003e, \u003ca href=\"https://hackerrank.com\"\u003ehackerank\u003c/a\u003e and \u003ca href=\"http://sqlzoo.net\"\u003esqlzoo\u003c/a\u003e. Links to questions and my answers are below!\n\n\n## LeetCode \n-----------\n\n| Question                | Answer                 |\n|-------------------------|------------------------:|\n| \u003ca href=\"https://leetcode.com/problems/employees-earning-more-than-their-managers/description/\"\u003eEmployees earn more than their managers\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/leetcode/employees_managers.sql\"\u003eSolution\u003c/a\u003e |\n| \u003ca href=\"https://leetcode.com/problems/second-highest-salary/description/\"\u003eSecond highest salaries\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/leetcode/SecondHighestSalary.sql\"\u003eSolution\u003c/a\u003e |\n| \u003ca href=\"https://leetcode.com/problems/customers-who-never-order/\"\u003eCustomers who never order\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/leetcode/CustomersDontOrder.sql\"\u003eSolution\u003c/a\u003e | \n| \u003ca href=\"https://leetcode.com/problems/duplicate-emails/description/\"\u003eDuplicate Emails\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/leetcode/DuplicateEmails.sql\"\u003eSolution\u003c/a\u003e |\n|[Rising Temperatures](https://leetcode.com/problems/rising-temperature) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/RisingTemperatures.sql) |\n|[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|[N-th Highest Salary](https://leetcode.com/problems/nth-highest-salary/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/NthHighestSalary.sql)|\n|[Department Highest Salary](https://leetcode.com/problems/department-highest-salary/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/DeptHighestSalary.sql) |\n| [Monthly Transactions I](https://leetcode.com/problems/monthly-transactions-i/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/monthly-transactions-i.sql) |\n| [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) |\n| [Rank Scores](https://leetcode.com/problems/rank-scores/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/RankScores.sql) |\n| [Not Boring Movies](https://leetcode.com/problems/not-boring-movies/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/notboringmovies.sql)|\n| [Exchange Seats](https://leetcode.com/problems/exchange-seats/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/exchange-seats.sql)|\n| [Consecutive Numbers](https://leetcode.com/problems/consecutive-numbers/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/ConsecutiveNumbers.sql)|\n| [Human Traffice Of Stadium](https://leetcode.com/problems/human-traffic-of-stadium/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/HumanTrafficStadium.sql) |\n| [Trips and Users](https://leetcode.com/problems/trips-and-users/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/trips_and_users.sql) |\n|[Capital Gains/Loss](https://leetcode.com/problems/capital-gainloss/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/capital-gainloss.sql) |\n|[Market Analysis I](https://leetcode.com/problems/market-analysis-i/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/market-analysis-i.sql) |\n|[Tree Node](https://leetcode.com/problems/tree-node/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/tree-node.sql) |\n| [Restaurant Growth](https://leetcode.com/problems/restaurant-growth/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/restaurant-growth.sql) |\n| [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) |\n| [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) |\n| [Investments In 2016](https://leetcode.com/problems/investments-in-2016/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/investments-in-2016.sql) |\n| [Friend Requests II: Who Has the Most Friends](https://leetcode.com/problems/friend-requests-ii-who-has-the-most-friends/description/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/friend-requests-ii-who-has-the-most-friends.sql)|\n| [Odd And Even Transactions](https://leetcode.com/problems/odd-and-even-transactions/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/odd-and-event-transactions.sql) |\n| [Confirmation Rate](https://leetcode.com/problems/confirmation-rate/) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/leetcode/confirmation-rate.sql) |\n\n\n\n\n## DataLemur\n---------------\n| Question                | Answer                 |\n|-------------------------|------------------------:|\n|[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) |\n|[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) |\n|[Matching Skills](https://datalemur.com/questions/matching-skills) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/matching-skills.sql) |\n| [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) |\n| [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) |\n| [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) |\n| [Frequently Purchased Pairs](https://datalemur.com/questions/frequently-purchased-pairs) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/frequently-purchased-pairs.sql) |\n| [Supercloud Customer](https://datalemur.com/questions/supercloud-customer) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/supercloud-customer.sql) |\n| [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) |\n| [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) |\n| [Repeated Payments](https://datalemur.com/questions/repeated-payments) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/repeated-payments.sql) |\n| [Compressed Mode](https://datalemur.com/questions/alibaba-compressed-mode) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/alibaba-compressed-mode.sql) |\n| [Signup Activation Rate](https://datalemur.com/questions/signup-confirmation-rate) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/signup-confirmation-rate.sql) |\n| [Highest-Grossing Items](https://datalemur.com/questions/sql-highest-grossing) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/sql-highest-grossing.sql) |\n| [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) |\n| [International Call Percentage](https://datalemur.com/questions/international-call-percentage) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/international-call-percentage.sql) |\n| [Tweets' Rolling Average](https://datalemur.com/questions/rolling-average-tweets) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/rolling-average-tweets.sql) |\n| [Top Three Salaries](https://datalemur.com/questions/sql-top-three-salaries) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/sql-top-three-salaries.sql) |\n| [Histogram of Users and Purchases](https://datalemur.com/questions/histogram-users-purchases) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/datalemur/histogram-users-purchases.sql) |\n\n\n\n\n\n## Hacker Rank\n---------------\n\n| Question                | Answer                 |\n|-------------------------|------------------------:|\n| [Japanese Cities](https://www.hackerrank.com/challenges/japanese-cities-attributes/problem) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/JapaneseCities.sql) |\n| \u003ca href=\"https://www.hackerrank.com/challenges/earnings-of-employees/\"\u003eEarnings of employees\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/EmployeeEarnings.sql\"\u003eSolution\u003c/a\u003e |\n| [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) |\n| [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) |\n| [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) |\n| [The Pads](https://www.hackerrank.com/challenges/the-pads/problem) | [Solution](https://github.com/mdh266/SQL-Practice/blob/master/hackerrank/ThePads.sql) |\n| [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) |\n\n\n\n## SQLZoo\n------------\n\n| Question                | Answer                 |\n|-------------------------|------------------------:|\n| \u003ca href=\"https://sqlzoo.net/wiki/SELECT_within_SELECT_Tutorial\"\u003eRicher Than UK\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/sqlzoo/RicherThanUK.sql\"\u003eSolution\u003c/a\u003e |\n| \u003ca href=\"https://sqlzoo.net/wiki/SELECT_within_SELECT_Tutorial\"\u003eBigger Than Every Country In Europe\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/sqlzoo/BiggerThanEurope.sql\"\u003eSolution\u003c/a\u003e |\n| \u003ca href=\"https://sqlzoo.net/wiki/SELECT_within_SELECT_Tutorial\"\u003eNeighbours of Argentina and Australia\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/sqlzoo/NeighborsOfArgentinaAndAustralia.sql\"\u003eSolution\u003c/a\u003e |\n| \u003ca href=\"http://sqlzoo.net/wiki/The_JOIN_operation\"\u003eTeams that have coach Fernando Santos\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/sqlzoo/TeamsThatHaveCoach.sql\"\u003eSolution\u003c/a\u003e |\n| \u003ca href=\"https://sqlzoo.net/wiki/More_JOIN_operations\"\u003eBusy years for John Travolta\u003c/a\u003e | \u003ca href=\"https://github.com/mdh266/SQL-Practice/blob/master/sqlzoo/BusyYearsJohnTravolta.sql\"\u003eSolution\u003c/a\u003e |\n","funding_links":[],"categories":["Others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdh266%2FSQL-Practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdh266%2FSQL-Practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdh266%2FSQL-Practice/lists"}