Skip to content

comprehensive collection of SQL solutions and explanations for HackerRank problems, organized by difficulty and topic to help developers master database querying skills

Notifications You must be signed in to change notification settings

aboubakr-jelloulat/sql-hackerrank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

SQL HackerRank Practice

SQL Server Logo
Coding GIF

A comprehensive collection of SQL solutions and explanations for HackerRank problems, organized by difficulty and topic to help developers master database querying skills.

About

This repository contains solutions to SQL problems from HackerRank, designed to help developers improve their database querying skills. Each solution includes detailed explanations, multiple approaches where applicable, and best practices for writing efficient SQL queries.

Whether you're preparing for technical interviews, improving your database skills, or simply looking to master SQL fundamentals, this repository provides structured practice with real-world problem-solving scenarios.

Getting Started

Prerequisites

  • Basic understanding of SQL syntax and database concepts
  • Access to a SQL database system (MySQL, PostgreSQL, SQLite, SQL Server, etc.)
  • Text editor or SQL IDE (MySQL Workbench, pgAdmin, DBeaver, VS Code)
  • Git installed on your local machine
  • A HackerRank account for accessing original problem statements

Setup Instructions

  1. Clone the repository:
git clone <url>
cd  repo 
  1. Choose your preferred SQL environment and set up a practice database

  2. Navigate to any problem directory to view solutions and explanations

  3. Test solutions using your preferred SQL environment

Problem Categories

Basic Select

Fundamental SELECT operations, filtering, and data retrieval

  • Revising the SELECT Query
  • Select All
  • Select By ID
  • Japanese Cities Attributes
  • Weather Observation Station series

Advanced Select

Complex conditional logic and data transformation

  • Type of Triangle
  • The PADS
  • Occupations
  • Binary Tree Nodes
  • New Companies

Aggregation

GROUP BY operations and aggregate functions

  • Revising Aggregations
  • The Count Function
  • The Sum Function
  • Averages
  • Population Census
  • Population Density Difference

Basic Join

Table relationships and JOIN operations

  • Population Census
  • Asian Population
  • African Cities
  • Average Population of Each Continent
  • The Report
  • Top Competitors

Advanced Join

Complex multi-table operations and advanced JOIN techniques

  • SQL Project Planning
  • Placements
  • Symmetric Pairs
  • Interviews
  • 15 Days of Learning SQL

Alternative Queries

Pattern generation and advanced problem-solving

  • Draw The Triangle patterns
  • Print Prime Numbers

Resources

SQL Learning Resources

Practice Platforms

License

This project is licensed under the MIT License. The problems are property of HackerRank and are used here for educational purposes only. Solutions are provided to help with learning and should not be used to cheat on actual assessments.


Happy Coding!
Remember, the best way to learn SQL is through consistent practice and understanding the logic behind each query.

About

comprehensive collection of SQL solutions and explanations for HackerRank problems, organized by difficulty and topic to help developers master database querying skills

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages