- Use this repository to practice sql queries.
- This repository contains three data analysis projects using SQL.
- Use those projects to learn querying.
- Dont depend entirely on this repository to learn sql.
- There is a lot of free materials available. Google it, find them and learn the concepts from there and use this repo to practice and to view some projects based on sql queries.
- Material that i found useful while learning was from W3schools.
- We will go over the basics of SQL. Like SELECT, INSERT and some functions.
- We will also do three projects on day 4, day 5 and day 6.
- These projects will help you get your hands dirty and make you familiar with SQL queries.
DAY | CONTENTS |
---|---|
DAY 1 | create, insert, select, and or not operators, order by |
DAY 2 | functions sum,avg and count |
DAY 3 | inner join, left join, right join and outer join |
DAY 4-5 | Covid-19 data analysis and data visualization |
DAY 6 | IPL data analysis project |
DAY 7 | Sales insights project |
- We will write queries using the employees database.
- Previously we only worked with databases with a single table. Now we will work with multiple tables.
- The database that is used from day 8-14 is taken from here.
- Follow the instructions in that github repository to install the database in your localhost.
- If you have any problems installing the database there are many youtube videos available on how to install it. Refer and do it.
- This database is widely used to practice SQL queries.
- This database has six tables employees, dept_manager, department, dept_emp, salaries, titles.
- The schema of the database is shown below.
DAY | CONTENTS |
---|---|
DAY 8 | Employees table |
DAY 9 | titles and salaries tables |
DAY 10 | department, dept_manager, dept_emp tables |
DAY 11 | Using employees, salaries, titles tables together |
DAY 12 | Using department, dept_manager tables together |
DAY 13-14 | Using all 6 tables together |
We have gotten a good understanding of how to write queries. Now lets practice more and more queries using Hackerrank SQL section.
Problem name(code) | Problem Link | Problem Solution |
---|---|---|
Revising the Select Query I | Link | solution |
Revising the Select Query II | Link | solution |
Select All | Link | solution |
Select By ID | Link | solution |
Japanese Cities' Attributes | Link | solution |
Japanese Cities' Names | Link | solution |
Weather Observation Station 1 | Link | solution |
Weather Observation Station 3 | Link | solution |
Weather Observation Station 4 | Link | solution |
Weather Observation Station 5 | Link | solution |
Weather Observation Station 6 | Link | solution |
Weather Observation Station 7 | Link | solution |
Weather Observation Station 8 | Link | solution |
Weather Observation Station 9 | Link | solution |
Weather Observation Station 10 | Link | solution |
Weather Observation Station 11 | Link | solution |
Weather Observation Station 12 | Link | solution |
Higher Than 75 Marks | Link | solution |
Employee Names | Link | solution |
Employee Salaries | Link | solution |
Weather Observation Station 13 | Link | solution |
Weather Observation Station 14 | Link | solution |
Weather Observation Station 15 | Link | solution |
Weather Observation Station 17 | Link | solution |
Weather Observation Station 18 | Link | solution |
Weather Observation Station 20 | Link | solution |
Revising Aggregations - Averages | link | solution |
Average Population | link | solution |
Population Density Difference | link | solution |
The Blunder | link | solution |
Top Earners | link | solution |
Type of Triangle | link | solution |
Population Census | link | solution |
African Cities | link | solution |
Placements | link | solution |
New Companies | link | solution |