{"id":15002529,"url":"https://github.com/mohammed-bder/hackerrank-sql-solutions","last_synced_at":"2026-02-07T23:31:11.714Z","repository":{"id":253085921,"uuid":"840837073","full_name":"mohammed-bder/HackerRank-SQL-Solutions","owner":"mohammed-bder","description":"This repository contains my solutions on Hacker Rank in SQL","archived":false,"fork":false,"pushed_at":"2024-08-14T11:01:12.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T02:38:26.894Z","etag":null,"topics":["hackerrank-challenges","hackerrank-solutions","mssql","sql","sql-query"],"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/mohammed-bder.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":"2024-08-10T20:50:59.000Z","updated_at":"2024-08-14T11:01:15.000Z","dependencies_parsed_at":"2024-08-15T11:05:57.196Z","dependency_job_id":null,"html_url":"https://github.com/mohammed-bder/HackerRank-SQL-Solutions","commit_stats":null,"previous_names":["mohammedhasanahmed/hackerrank-sql-solutions","mohammed-bder/hackerrank-sql-solutions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohammed-bder/HackerRank-SQL-Solutions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed-bder%2FHackerRank-SQL-Solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed-bder%2FHackerRank-SQL-Solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed-bder%2FHackerRank-SQL-Solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed-bder%2FHackerRank-SQL-Solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammed-bder","download_url":"https://codeload.github.com/mohammed-bder/HackerRank-SQL-Solutions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed-bder%2FHackerRank-SQL-Solutions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267482004,"owners_count":24094508,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hackerrank-challenges","hackerrank-solutions","mssql","sql","sql-query"],"created_at":"2024-09-24T18:51:00.186Z","updated_at":"2026-02-07T23:31:11.685Z","avatar_url":"https://github.com/mohammed-bder.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![ViewCount](https://views.whatilearened.today/views/github/MohammedHasanAhmed/HackerRank-SQL-Solutions.svg?cache=remove)\n\n# HackerRank-SQL-Solutions\n\n\u003cp align=\"center\"\u003e  \n\t\u003cbr\u003e\n\t      \u003ca href=\"https://github.com/MohammedHasanAhmed\"\u003e\n        \u003cimg src=\"https://wizardsourcer.com/wp-content/uploads/2021/10/HackerRank-logo.png\"\u003e \n    \u003c/a\u003e\n  \u003cbr\u003e\n\u003c/p\u003e\n\n## Description\nThis repository contains My Solutions of SQL challenges on [HackerRank](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions) and you can see multiple solutions for the same challenge. The repository contains 4 folders. These folders contain solutions for easy, medium, and difficult challenges executed on an MS SQL environment.\n_____\n\n## Folders in the Repo\n- [Basic Select](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/tree/main/Basic%20Select)\n- [Advanced Select](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/tree/main/Advanced%20Select)\n- [Aggregation](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/tree/main/Aggregation)\n- [Basic Join](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/tree/main/Basic%20Join)\n\n_____\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) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Revising%20the%20Select%20Query%20I.sql)\n| 2 | [Revising the Select Query II](https://www.hackerrank.com/challenges/revising-the-select-query-2/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Revising%20the%20Select%20Query%20II.sql)\n| 3 | [Select All](https://www.hackerrank.com/challenges/select-all-sql/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Select%20All.sql)\n| 4 | [Select By ID](https://www.hackerrank.com/challenges/select-by-id/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Select%20By%20ID.sql)\n| 5 | [Japanese Cities' Attributes](https://www.hackerrank.com/challenges/japanese-cities-attributes/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Japanese%20Cities'%20Attributes.sql)\n| 6 | [Japanese Cities' Names](https://www.hackerrank.com/challenges/japanese-cities-name/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Japanese%20Cities'%20Names.sql)\n| 7 | [Weather Observation Station 1](https://www.hackerrank.com/challenges/weather-observation-station-1/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%201.sql)\n| 8 | [Weather Observation Station 3](https://www.hackerrank.com/challenges/weather-observation-station-3/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%203.sql)\n| 9 | [Weather Observation Station 4](https://www.hackerrank.com/challenges/weather-observation-station-4/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%204.sql)\n| 10| [Weather Observation Station 5](https://www.hackerrank.com/challenges/weather-observation-station-5/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%205.sql)\n| 11| [Weather Observation Station 6](https://www.hackerrank.com/challenges/weather-observation-station-6/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%206.sql)\n| 12| [Weather Observation Station 7](https://www.hackerrank.com/challenges/weather-observation-station-7/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%207.sql)\n| 13| [Weather Observation Station 8](https://www.hackerrank.com/challenges/weather-observation-station-8/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%208.sql)\n| 14| [Weather Observation Station 9](https://www.hackerrank.com/challenges/weather-observation-station-9/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%209.sql)\n| 15| [Weather Observation Station 10](https://www.hackerrank.com/challenges/weather-observation-station-10/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%2010.sql)\n| 16| [Weather Observation Station 11](https://www.hackerrank.com/challenges/weather-observation-station-11/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%2011.sql)\n| 17| [Weather Observation Station 12](https://www.hackerrank.com/challenges/weather-observation-station-12/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Weather%20Observation%20Station%2012.sql)\n| 18| [Higher Than 75 Marks](https://www.hackerrank.com/challenges/more-than-75-marks/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Higher%20Than%2075%20Marks.sql)\n| 19| [Employee Names](https://www.hackerrank.com/challenges/name-of-employees/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Employee%20Names.sql)\n| 20| [Employee Salaries](https://www.hackerrank.com/challenges/salary-of-employees/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Select/Employee%20Salaries.sql)\n\n_____\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) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Advanced%20Select/Type%20of%20Triangle.sql) \n| 2 |[The PADS](https://www.hackerrank.com/challenges/the-pads/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Advanced%20Select/The%20PADS.sql) \n| 3 |[Occupations](https://www.hackerrank.com/challenges/occupations/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Advanced%20Select/Occupations.sql) \n| 4 |[Binary Tree Nodes](https://www.hackerrank.com/challenges/binary-search-tree-1/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Advanced%20Select/Binary%20Tree%20Nodes.sql)\n| 5 |[New Companies](https://www.hackerrank.com/challenges/the-company/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Advanced%20Select/New%20Companies.sql) \n\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) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Revising%20Aggregations%20-%20The%20Count%20Function.sql) \n| 2 | [Revising Aggregations - The Sum Function](https://www.hackerrank.com/challenges/revising-aggregations-sum/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Revising%20Aggregations%20-%20The%20Sum%20Function.sql)\n| 3 | [Revising Aggregations - Averages](https://www.hackerrank.com/challenges/revising-aggregations-the-average-function/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Revising%20Aggregations%20-%20Averages.sql)\n| 4 | [Average Population](https://www.hackerrank.com/challenges/average-population/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Average%20Population.sql)\n| 5 | [Japan Population](https://www.hackerrank.com/challenges/japan-population/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Japan%20Population.sql)\n| 6 | [Population Density Difference](https://www.hackerrank.com/challenges/population-density-difference/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Population%20Density%20Difference.sql)\n| 7 | [The Blunder](https://www.hackerrank.com/challenges/the-blunder/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/The%20Blunder.sql)\n| 8 | [Top Earners](https://www.hackerrank.com/challenges/earnings-of-employees/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Top%20Earners.sql)   \n| 9 | [Weather Observation Station 2](https://www.hackerrank.com/challenges/weather-observation-station-2/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%202.sql) \n| 10| [Weather Observation Station 13](https://www.hackerrank.com/challenges/weather-observation-station-13/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2013.sql)\n| 11| [Weather Observation Station 14](https://www.hackerrank.com/challenges/weather-observation-station-14/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2014.sql)\n| 12| [Weather Observation Station 15](https://www.hackerrank.com/challenges/weather-observation-station-15/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2015.sql)\n| 13| [Weather Observation Station 16](https://www.hackerrank.com/challenges/weather-observation-station-16/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2016.sql)\n| 14| [Weather Observation Station 17](https://www.hackerrank.com/challenges/weather-observation-station-17/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2017.sql)\n| 15| [Weather Observation Station 18](https://www.hackerrank.com/challenges/weather-observation-station-18/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2018.sql)\n| 16| [Weather Observation Station 19](https://www.hackerrank.com/challenges/weather-observation-station-19/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2019.sql)\n| 17| [Weather Observation Station 20](https://www.hackerrank.com/challenges/weather-observation-station-20/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Aggregation/Weather%20Observation%20Station%2020.sql)\n\n_____\n\n## Basic Join Challenges\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 | [African Cities](https://www.hackerrank.com/challenges/african-cities/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Join/African%20Cities.sql)\n| 2 | [Average Population of Each Continent](https://www.hackerrank.com/challenges/average-population-of-each-continent/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Join/Average%20Population%20of%20Each%20Continent.sql)\n| 3 | [Population Census](https://www.hackerrank.com/challenges/asian-population/problem) | [Solution](https://github.com/MohammedHasanAhmed/HackerRank-SQL-Solutions/blob/main/Basic%20Join/Population%20Census.sql)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed-bder%2Fhackerrank-sql-solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammed-bder%2Fhackerrank-sql-solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed-bder%2Fhackerrank-sql-solutions/lists"}