{"id":20021766,"url":"https://github.com/ndleah/sql-hackerrank-challenge-solutions","last_synced_at":"2026-03-19T13:05:05.335Z","repository":{"id":105089349,"uuid":"379976377","full_name":"ndleah/SQL-Hackerrank-Challenge-Solutions","owner":"ndleah","description":"HackerRank SQL track solutions","archived":false,"fork":false,"pushed_at":"2021-07-25T14:51:30.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T03:43:01.401Z","etag":null,"topics":["challenge","hackerrank","hackerrank-algorithms-solutions","hackerrank-challenges","hackerrank-solutions","hackerrank-sql","problem-solving","solutions","sql"],"latest_commit_sha":null,"homepage":"https://www.hackerrank.com/nduongthucanh?hr_r=1","language":"SQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndleah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-06-24T15:46:56.000Z","updated_at":"2024-06-05T02:46:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc6b8451-c58e-475e-bb03-bc6ac6250e9c","html_url":"https://github.com/ndleah/SQL-Hackerrank-Challenge-Solutions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ndleah/SQL-Hackerrank-Challenge-Solutions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndleah%2FSQL-Hackerrank-Challenge-Solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndleah%2FSQL-Hackerrank-Challenge-Solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndleah%2FSQL-Hackerrank-Challenge-Solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndleah%2FSQL-Hackerrank-Challenge-Solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndleah","download_url":"https://codeload.github.com/ndleah/SQL-Hackerrank-Challenge-Solutions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndleah%2FSQL-Hackerrank-Challenge-Solutions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30113110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["challenge","hackerrank","hackerrank-algorithms-solutions","hackerrank-challenges","hackerrank-solutions","hackerrank-sql","problem-solving","solutions","sql"],"created_at":"2024-11-13T08:38:07.835Z","updated_at":"2026-03-05T07:01:16.342Z","avatar_url":"https://github.com/ndleah.png","language":"SQL","readme":"![Star Badge](https://img.shields.io/static/v1?label=%F0%9F%8C%9F\u0026message=If%20Useful\u0026style=style=flat\u0026color=BC4E99)\n[![View Repositories](https://img.shields.io/badge/View-My_Repositories-blue?logo=GitHub)](https://github.com/ndleah?tab=repositories)\n[![View My Profile](https://img.shields.io/badge/View-My_Profile-green?logo=GitHub)](https://github.com/ndleah)\n\n\u003cp align=\"center\"\u003e  \n    \u003cbr\u003e\n    \u003ca href=\"https://www.hackerrank.com/ndleah\"\u003e\n        \u003cimg height=100 src=\"https://d3keuzeb2crhkn.cloudfront.net/hackerrank/assets/styleguide/logo_wordmark-f5c5eb61ab0a154c3ed9eda24d0b9e31.svg\"\u003e \n    \u003c/a\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n## Description\nThe solutions of all the SQL challenges for all easy, medium and hard challenges on HackerRank executed on MS SQL environment compiled with helpful Resources \u0026 references related to the challenges.\n\n## Domains\n\n### Basic Select Challenges\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 | [Revising the Select Query I](https://www.hackerrank.com/challenges/revising-the-select-query/problem) | [SQL](Basic%20Select/Revising-the-select-Query-1.sql)\n| 2 | [Revising the Select Query II](https://www.hackerrank.com/challenges/revising-the-select-query-2/problem) | [SQL](Basic%20Select/Revising-the-select-Query-2.sql)\n| 3 | [Select All](https://www.hackerrank.com/challenges/select-all-sql/problem) | [SQL](Basic%20Select/Select-All.sql)\n| 4 | [Select By ID](https://www.hackerrank.com/challenges/select-by-id/problem) | [SQL](Basic%20Select/Select-By-ID.sql)\n| 5 | [Japanese Cities' Attributes](https://www.hackerrank.com/challenges/japanese-cities-attributes/problem) | [SQL](Basic%20Select/Japanese-Cities'-Attributes.sql)\n| 6 | [Japanese Cities' Names](https://www.hackerrank.com/challenges/japanese-cities-name/problem) | [SQL](Basic%20Select/Japanese-Cities'-Names.sql)\n| 7 | [Weather Observation Station 1](https://www.hackerrank.com/challenges/weather-observation-station-1/problem) | [SQL](Basic%20Select/Weather-Observation-Station-1.sql)\n| 8 | [Weather Observation Station 3](https://www.hackerrank.com/challenges/weather-observation-station-3/problem) | [SQL](Basic%20Select/Weather-Observation-Station-3.sql)\n| 9 | [Weather Observation Station 4](https://www.hackerrank.com/challenges/weather-observation-station-4/problem) | [SQL](Basic%20Select/Weather-Observation-Station-4.sql)\n| 10| [Weather Observation Station 5](https://www.hackerrank.com/challenges/weather-observation-station-5/problem) | [SQL](Basic%20Select/Weather-Observation-Station-5.sql)\n| 11| [Weather Observation Station 6](https://www.hackerrank.com/challenges/weather-observation-station-6/problem) | [SQL](Basic%20Select/Weather-Observation-Station-6.sql)\n| 12| [Weather Observation Station 7](https://www.hackerrank.com/challenges/weather-observation-station-7/problem) | [SQL](Basic%20Select/Weather-Observation-Station-7.sql)\n| 13| [Weather Observation Station 8](https://www.hackerrank.com/challenges/weather-observation-station-8/problem) | [SQL](Basic%20Select/Weather-Observation-Station-8.sql)\n| 14| [Weather Observation Station 9](https://www.hackerrank.com/challenges/weather-observation-station-9/problem) | [SQL](Basic%20Select/Weather-Observation-Station-9.sql)\n| 15| [Weather Observation Station 10](https://www.hackerrank.com/challenges/weather-observation-station-10/problem) | [SQL](Basic%20Select/Weather-Observation-Station-10.sql)\n| 16| [Weather Observation Station 11](https://www.hackerrank.com/challenges/weather-observation-station-11/problem) | [SQL](Basic%20Select/Weather-Observation-Station-11.sql)\n| 17| [Weather Observation Station 12](https://www.hackerrank.com/challenges/weather-observation-station-12/problem) | [SQL](Basic%20Select/Weather-Observation-Station-12.sql)\n| 18| [Higher Than 75 Marks](https://www.hackerrank.com/challenges/more-than-75-marks/problem) | [SQL](Basic%20Select/Higher-Than-75-Marks.sql)\n| 19| [Employee Names](https://www.hackerrank.com/challenges/name-of-employees/problem) | [SQL](Basic%20Select/Employee-Names.sql)\n| 20| [Employee Salaries](https://www.hackerrank.com/challenges/salary-of-employees/problem) | [SQL](Basic%20Select/Employee-Salaries.sql)\n\n### Advanced Select Challenges\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 |[Type of Triangle](https://www.hackerrank.com/challenges/what-type-of-triangle/problem) | [SQL](Advanced%20Select/Type%20of%20Triangle.sql) |\n| 2 |[The PADS](https://www.hackerrank.com/challenges/the-pads/problem) | [SQL](Advanced%20Select/The%20PADS.sql) |\n| 3 |[Occupations](https://www.hackerrank.com/challenges/occupations/problem) | [SQL](Advanced%20Select/Occupations.sql) |\n| 4 |[Binary Tree Nodes](https://www.hackerrank.com/challenges/binary-search-tree-1/problem) | [SQL](Advanced%20Select/Binary%20Tree%20Nodes.sql)|\n| 5 |[New Companies](https://www.hackerrank.com/challenges/the-company/problem) | [SQL](Advanced%20Select/New%20Companies.sql) |\n\n\n### Aggregation Challenges\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 | [Revising Aggregations - The Count Function](https://www.hackerrank.com/challenges/revising-aggregations-the-count-function/problem) | [SQL](Aggregation/Revising%20Aggregations%20-%20The%20Count%20Function.sql) | \n| 2 | [Revising Aggregations - The Sum Function](https://www.hackerrank.com/challenges/revising-aggregations-sum/problem) | [SQL](Aggregation/Revising%20Aggregations%20-%20The%20Sum%20Function.sql)                    |\n| 3 | [Revising Aggregations - Averages](https://www.hackerrank.com/challenges/revising-aggregations-the-average-function/problem) | [SQL](Aggregation/Revising%20Aggregations%20-%20Averages.sql)                       |\n| 4 | [Average Population](https://www.hackerrank.com/challenges/average-population/problem) | [SQL](Aggregation/Average%20Population.sql)                                                                               |\n| 5 | [Japan Population](https://www.hackerrank.com/challenges/japan-population/problem) | [SQL](Aggregation/Japan%20Population.sql)                                                                                     |\n| 6 | [Population Density Difference](https://www.hackerrank.com/challenges/population-density-difference/problem) | [SQL](Aggregation/Population%20Density%20Difference.sql)                                            |\n| 7 | [The Blunder](https://www.hackerrank.com/challenges/the-blunder/problem) | [SQL](Aggregation/The%20Blunder.sql)  \n| 8 | [Top Earners](https://www.hackerrank.com/challenges/earnings-of-employees/problem) | [SQL](Aggregation/Top%20Earners.sql) |         \n| 9 | [Weather Observation Station 2](https://www.hackerrank.com/challenges/weather-observation-station-2/problem) | [SQL](Aggregation/Weather%20Observation%20Station%202.sql) |\n| 10| [Weather Observation Station 13](https://www.hackerrank.com/challenges/weather-observation-station-13/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2013.sql) |\n| 11| [Weather Observation Station 14](https://www.hackerrank.com/challenges/weather-observation-station-14/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2014.sql) |\n| 12| [Weather Observation Station 15](https://www.hackerrank.com/challenges/weather-observation-station-15/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2015.sql) |\n| 13| [Weather Observation Station 16](https://www.hackerrank.com/challenges/weather-observation-station-16/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2016.sql) |\n| 14| [Weather Observation Station 17](https://www.hackerrank.com/challenges/weather-observation-station-17/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2017.sql) |\n| 15| [Weather Observation Station 18](https://www.hackerrank.com/challenges/weather-observation-station-18/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2018.sql) |\n| 16| [Weather Observation Station 19](https://www.hackerrank.com/challenges/weather-observation-station-19/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2019.sql) |\n| 17| [Weather Observation Station 20](https://www.hackerrank.com/challenges/weather-observation-station-20/problem) | [SQL](Aggregation/Weather%20Observation%20Station%2020.sql) |\n\n### Basic Join\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 | [Asian Population](https://www.hackerrank.com/challenges/asian-population/problem) | [SQL](Basic%20Join/Asian%20Population.sql) |\n| 2 | [African Cities](https://www.hackerrank.com/challenges/african-cities/problem) | [SQL](Basic%20Join/African%20Cities.sql) |\n| 3 | [Average Population of Each Continent](https://www.hackerrank.com/challenges/average-population-of-each-continent/problem) | [SQL](Basic%20Join/Average%20Population%20of%20Each%20Continent.sql) |\n| 4 | [The Report](https://www.hackerrank.com/challenges/the-report/submissions/code/94188063) | [SQL](Basic%20Join/The%20Report.sql) |\n| 5 | [Top Competitors](https://www.hackerrank.com/challenges/full-score/problem) | [SQL](Basic%20Join/Top%20Competitors.sql) |\n| 6 | [Ollivander's Inventory](https://www.hackerrank.com/challenges/harry-potter-and-wands/problem) | [SQL](Basic%20Join/Ollivander's%20Inventory.sql) |\n| 7 | [Challenges](https://www.hackerrank.com/challenges/challenges/problem) | [SQL](Basic%20Join/Challenges.sql) |\n\n### Advanced Select Challenges\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 |[Type of Triangle](https://www.hackerrank.com/challenges/what-type-of-triangle/problem) | [SQL](Advanced%20Select/Type%20of%20Triangle.sql) |\n| 2 |[The PADS](https://www.hackerrank.com/challenges/the-pads/problem) | [SQL](Advanced%20Select/The%20PADS.sql) |\n| 3 |[Occupations](https://www.hackerrank.com/challenges/occupations/problem) | [SQL](Advanced%20Select/Occupations.sql) |\n| 4 |[Binary Tree Nodes](https://www.hackerrank.com/challenges/binary-search-tree-1/problem) | [SQL](Advanced%20Select/Binary%20Tree%20Nodes.sql)|\n| 5 |[New Companies](https://www.hackerrank.com/challenges/the-company/problem) | [SQL](Advanced%20Select/New%20Companies.sql) |\n\n### Alternative Queries\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 |[Draw The Triangle 1](https://www.hackerrank.com/challenges/draw-the-triangle-1) | [SQL](Alternative%20Queries/Draw%20The%Trangle%1.sql) |\n| 2 |[Draw The Triangle 2](https://www.hackerrank.com/challenges/draw-the-triangle-2) | [SQL](Alternative%20Queries/Draw%20The%Trangle%2.sql) |\n\n## License\nThis repository is licensed under MIT License - see [License](LICENSE) for more details\n\n___________________________________\n\n\u003cp\u003e\u0026copy; 2021 Leah Nguyen\u003c/p\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndleah%2Fsql-hackerrank-challenge-solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndleah%2Fsql-hackerrank-challenge-solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndleah%2Fsql-hackerrank-challenge-solutions/lists"}