SQL Practice Questions Solutions

The solutions of all level of SQL questions present in Hackerrank & Leetcode are been provided with both question and answers for better understanding and better optimised solutions.

Hackerrank




Basic Select Questions

Number Questions Solutions
1 Revising the Select Query I Solution
2 Revising the Select Query II Solution
3 Select All Solution
4 Select By ID Solution
5 Japanese Cities' Attributes Solution
6 Japanese Cities' Names Solution
7 Weather Observation Station 1 Solution
8 Weather Observation Station 3 Solution
9 Weather Observation Station 4 Solution
10 Weather Observation Station 5 Solution
11 Weather Observation Station 6 Solution
12 Weather Observation Station 7 Solution
13 Weather Observation Station 8 Solution
14 Weather Observation Station 9 Solution
15 Weather Observation Station 10 Solution
16 Weather Observation Station 11 Solution
17 Weather Observation Station 12 Solution
18 Higher Than 75 Marks Solution
19 Employee Names Solution
20 Employee Salaries Solution

Advanced Select Questions

Number Questions Solutions
1 Type of Triangle Solution
2 The PADS Solution
3 Binary Tree Nodes Solution
4 New Companies Solution

Aggregation Questions

Number Questions Solutions
1 Revising Aggregations - The Count Function Solution
2 Revising Aggregations - The Sum Function Solution
3 Revising Aggregations - Averages Solution
4 Average Population Solution
5 Japan Population Solution
6 Population Density Difference Solution
7 The Blunder Solution
8 Top Earners Solution
9 Weather Observation Station 2 Solution
10 Weather Observation Station 13 Solution
11 Weather Observation Station 14 Solution
12 Weather Observation Station 15 Solution
13 Weather Observation Station 16 Solution
14 Weather Observation Station 17 Solution
15 Weather Observation Station 18 Solution
16 Weather Observation Station 19 Solution
17 Weather Observation Station 20 Solution

Basic Join Questions

Number Questions Solutions
1 Population Census Solution
2 African Cities Solution
3 Average Population of Each Continent Solution
4 The Report Solution
5 Ollivander's Inventory Solution
6 Challenges Solution
7 Contest Leaderboard Solution
8 Top Competitors Solution

Advanced Join Questions

Number Questions Solutions
1 Placements Solution

Alternative Queries Questions

Number Questions Solutions
1 Draw The Triangle 1 Solution
2 Draw The Triangle 2 Solution