SQL Roadmap
SQL Roadmap
docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT *
FROM city
WHERE countrycode = “USA” AND population > 100000
Revising the Select Query II
Query the NAME field for all American cities in the CITY table with populations larger
than 120000. The CountryCode for America is USA.
The CITY table is described as follows:
1of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT name
FROM city
WHERE countrycode = “USA” AND population > 120000
Select All
Query all columns (attributes) for every row in the CITY table.
The CITY table is described as follows:
2of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT *
FROM city
Select By ID
Query all columns for a city in CITY with the ID 1661.
The CITY table is described as follows:
Solution
SELECT *
FROM city
WHERE id = 1661 -- beware of data type(not string, number)
Japanese Cities’ Attributes
Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan
is JPN.
The CITY table is described as follows:
3of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT *
FROM city
WHERE countrycode = “JPN”
Japanese Cities’ Names
Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan
is JPN.
The CITY table is described as follows:
4of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT name
FROM city
WHERE countrycode = “JPN”
Weather Observation Station 1
Query a list of CITY and STATE from the STATION table.
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT city, state
FROM station
Weather Observation Station 3
Query a list of CITY names from STATION for cities that have an even ID number. Print the
results in any order, but exclude duplicates from the answer.
The STATION table is described as follows:
5of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE id % 2 = 0
OR
WHERE MOD(id, 2) = 0
The MOD() function returns the remainder of a number divided by another number.
Weather Observation Station 4
Find the difference between the total number of CITY entries in the table and the number of
distinct CITY entries in the table.
The STATION table is described as follows:
6of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
For example, if there are three records in the table with CITY values ‘New York’, ‘New York’,
‘Bengalaru’, there are 2 different city names: ‘New York’ and ‘Bengalaru’. The query returns 1,
because
Solution
SELECT COUNT(city) — COUNT(DISTINCT city)
FROM station
Weather Observation Station 5
Query the two cities in STATION with the shortest and longest CITY names, as well as their
respective lengths (i.e.: number of characters in the name). If there is more than one smallest
or largest city, choose the one that comes first when ordered alphabetically.
The STATION table is described as follows:
7of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Note
You can write two separate queries to get the desired output. It need not be a single query.
Solution
(SELECT city, LENGTH(city)
FROM station
ORDER BY LENGTH(city), city
LIMIT 1)
UNION
(SELECT city, LENGTH(city)
FROM station
ORDER BY LENGTH(city) DESC, city
LIMIT 1)
Weather Observation 6
Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result
cannot contain duplicates.
Input Format
The STATION table is described as follows:
8of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE city REGEXP ‘^[AEIOUaeiou]’
Weather Observation Station 7
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot
contain duplicates.
Input Format
The STATION table is described as follows:
9of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE city REGEXP ‘^.*[aeiouAEIOU]$’
Weather Observation Station 8
Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both
their first and last characters. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
10of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Soultion
SELECT DISTINCT city
FROM station
WHERE city REGEXP ‘^[aeiouAEIOU].*[aeiouAEIOU]$’
Weather Observation Station 9
Query the list of CITY names from STATION that do not start with vowels. Your result cannot
contain duplicates.
Input Format
The STATION table is described as follows:
11of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE city REGEXP ‘^[^aeiouAEIOU]’
Weather Observation Station 10
Query the list of CITY names from STATION that do not end with vowels. Your result cannot
contain duplicates.
Input Format
The STATION table is described as follows:
12of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE city REGEXP ‘[^aeiouAEIOU]$’
Weather Observation Station 11
Query the list of CITY names from STATION that either do not start with vowels or do not end
with vowels. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
13of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE city REGEXP '^[^aeiouAEIOU]' OR city REGEXP '[^aeiouAEIOU]$'
Weather Observation Station 12
Query the list of CITY names from STATION that do not start with vowels and do not end with
vowels. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
14of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution
SELECT DISTINCT city
FROM station
WHERE city REGEXP ‘^[^aeiouAEIOU].*[^aeiouAEIOU]$’
Higher Than 75 Marks
Query the Name of any student in STUDENTS who scored higher than 75 Marks. Order your
output by the last three characters of each name. If two or more students both have names
ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by
ascending ID.
Input Format
The STUDENTS table is described as follows:
15of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
The Name column only contains uppercase (A-Z) and lowercase (a-z) letters.
Solution
SELECT name
FROM students
WHERE marks > 75
ORDER BY RIGHT(name, 3), id
Employee Names
Write a query that prints a list of employee names (i.e.: the name attribute) from
the Employee table in alphabetical order.
Input Format
The Employee table containing employee data for a company is described as follows:
where employee_id is an employee’s ID number, name is their name, months is the total
number of months they’ve been working for the company, and salary is their monthly salary.
Solution
SELECT name
FROM employee
ORDER BY name
Employee Salaries
Write a query that prints a list of employee names (i.e.: the name attribute) for employees
in Employee having a salary greater than per month who have been employees for less than 10
months. Sort your result by ascending employee_id.
Input Format
The Employee table containing employee data for a company is described as follows:
16of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
where employee_id is an employee’s ID number, name is their name, months is the total
number of months they’ve been working for the company, and salary is the their monthly
salary.
Solution
SELECT name
FROM employee
WHERE months < 10 AND salary > 2000
ORDER BY employee_id
Asian Population
Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the
CONTINENT is ‘Asia’.
Note: CITY.CountryCode and COUNTRY.Code are matching key columns.
Input Format
The CITY and COUNTRY tables are described as follows:
17of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
18of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT SUM(city.population)
FROM city
LEFT JOIN country ON city.countrycode = country.code
WHERE country.continent = 'Asia'
African Cities
Given the CITY and COUNTRY tables, query the names of all cities where the CONTINENT is
‘Africa’.
19of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
20of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT city.name
FROM city
LEFT JOIN country ON city.countrycode = country.code
WHERE country.continent = 'Africa'
Average Population of Each Continent
Given the CITY and COUNTRY tables, query the names of all the continents
(COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded
down to the nearest integer.
21of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
22of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Solution
SELECT country.continent, FLOOR(AVG(city.population))
FROM country
INNER JOIN city ON city.countrycode = country.code
GROUP BY country.continent
The Report
You are given two tables: Students and Grades. Students contains three columns ID, Name and
Marks.
23of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark.
Ketty doesn’t want the NAMES of those students who received a grade lower than 8. The report
must be in descending order by grade — i.e. higher grades are entered first. If there is more
than one student with the same grade (8–10) assigned to them, order those particular students
by their name alphabetically. Finally, if the grade is lower than 8, use “NULL” as their name and
list them by their grades in descending order. If there is more than one student with the same
24of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
grade (1–7) assigned to them, order those particular students by their marks in ascending
order.
Write a query to help Eve.
Note
Print “NULL” as the name if the grade is less than 8.
Solution
SELECT
CASE WHEN g.grade >= 8 THEN s.name
ELSE null
END name,
g.grade,
s.marks
FROM students s
JOIN grades g ON s.marks BETWEEN g.min_mark AND g.max_mark
ORDER BY g.grade DESC, name, s.marks
Top Competitors
Julia just finished conducting a coding contest, and she needs your help assembling the
leaderboard! Write a query to print the respective hacker_id and name of hackers who
achieved full scores for more than one challenge. Order your output in descending order by the
total number of challenges in which the hacker earned a full score. If more than one hacker
received full scores in same number of challenges, then sort them by ascending hacker_id.
Input Format
The following tables contain contest data:
Hackers: The hacker_id is the id of the hacker, and name is the name of the hacker.
Difficulty: The difficult_level is the level of difficulty of the challenge, and score is the
score of the challenge for the difficulty level.
25of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Challenges: The challenge_id is the id of the challenge, the hacker_id is the id of the
hacker who created the challenge, and difficulty_level is the level of difficulty of the
challenge.
Solution
SELECT hacker_id, name
FROM
(SELECT h.hacker_id hacker_id, h.name name, c.challenge_id challenge_id
FROM hackers h
JOIN submissions s ON s.hacker_id = h.hacker_id
JOIN challenges c ON c.challenge_id = s.challenge_id
JOIN difficulty d ON d.difficulty_level = c.difficulty_level
26of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
27of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
1. HackerRank
From software engineering to data analytics, HackerRank is one of the best platforms for
practicing coding interview questions. HackerRank’s SQL practice suite has hundreds of
questions available for you to practice.
You can filter the questions by their difficulty levels: easy, medium, and hard. Alternatively,
depending on your comfort level, you can choose to practice questions on basic, intermediate,
and advanced SQL topics. In addition, you can filter the practice questions by topics, such as
select queries, joins, and aggregations.
After practicing, you can also take HackerRank’s Skills Certification Test to test your SQL skills.
These tests are timed assessments that require you to solve SQL questions within a time limit.
Currently, the following SQL assessments are available:
1) SQL Basic tests you on simple queries, relationships, and aggregations.
2) SQL Intermediate covers joins, unions, and subqueries.
3) SQL Advanced includes query optimization, modeling, indexing, and window functions.
You can access the whole collection of practice questions and assessments with a free account
on the platform.
2. SQLPad
3. StrataScratch
28of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
StrataScratch, another popular practice platform for SQL interviews, has a huge collection of
SQL interview questions. In addition to filtering by topics and difficulty level, you can filter
through the list of the questions to get company-specific SQL interview questions.
Their coding workspace supports PostgreSQL, MySQL, and Microsoft SQL Server (in beta). If
Python is your preferred programming language, you can use pandas to solve the questions.
Under the free tier, you can access up to 50 questions with solutions, and attempt over 500 SQL
questions.
4. DataLemur
DataLemur has a curated collection of SQL interview questions that have appeared in
interviews in tech companies like LinkedIn, Tesla, Microsoft, and Walmart among others.
The platform has over 40 SQL interview questions on topics such as conditional aggregation,
string and window functions, and cumulative sums.
5. LeetCode
If you are a Leetcode user, you can practice SQL on it too. The collection of SQL questions on
LeetCode is quite diverse, with varying difficulty levels and topics. You can also filter questions
by the tag: the tags correspond to the names of the companies. However, you can access only a
subset of the questions with a free account.
6. Mode
If you are looking for a SQL learning platform where you can practice as you learn, then Mode
can be a great choice. The Mode SQL tutorial has one of the most comprehensive and
thoughtfully structured curriculum.
The Mode SQL tutorial into is divided into the following sections:
• Basic SQL
29of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
7. SQLZoo
SQLZoo is another learning and practice platform for SQL. On SQLZoo, you can access bite-sized
lessons to learn SQL: from basic SELECT statements to more advanced concepts like window
functions. There are short practice exercises embedded into each of the lessons. To put your
SQL skills to test, there’s a dedicated assessment section that has more involved SQL
questions.
30of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Are you looking for places to practice SQL online? This list contains many
different websites that have SQL practice functionality.
Table of Contents
31of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQLZoo
Website
SQLZoo is a popular site for practising SQL. It has a large range of practice
exercises, from basic SELECT statements to more complicated queries.
Each page has a sample data set and several questions. You can enter the SQL
that you think is needed to give the answer that is asked for, submit the SQL,
and see the result. It also indicates if the result is correct or not.
32of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQL Fiddle
33of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
34of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQL Fiddle is a popular site for quickly generating sample databases and writing
SQL code on them. It can also be used for SQL practice. It’s a common way for
users on StackOverflow to generate sample data because the data sets are
saved on SQLFiddle and you can generate a link to that data set.
1. MySQL 5.6
2. Oracle 11g R2
3. PostgreSQL 9.6 and 9.3
4. SQLite
5. MS SQL Server 2017
DB-Fiddle
35of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
DB-Fiddle is one of two sites called “DB Fiddle”. This one is similar to the other
fiddles in that it lets you create tables, insert data, and run queries.
You can sign in to create an account, save your fiddles, and make them public or
private.
36of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
DB<>Fiddle
Website
This site is another “fiddle” site where you can enter your sample queries and
run them to see the results.
It has a sample database feature, which shows AdventureWorks for SQL Server,
and there are many other SQL versions supported:
HackerRank
37of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
HackerRank is a site that allows you to practice your skills in many different
languages, and one of the languages provided is SQL.
There are many different SQL challenges on the site, and each of them has a
sample data set, a question to answer with SQL, a list of the submissions, a
leaderboard, and discussions.
38of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Exercises are broken down by difficulty and you’re able to write the SQL in DB2,
MySQL, Oracle, and SQL Server.
SQL Bolt
39of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQL Bolt is a site that teaches SQL as well as including several exercises on
each concept. At the end of each page is a sample data set, and several
questions you can answer using SQL.
While it doesn’t have the same flexibility as an online editor like SQLFiddle, it
does explain the concepts and includes SQL practice exercises which are
helpful. It’s a popular resource for people to practice.
Website
Oracle Live SQL is a tool created by Oracle that lets you write and run SQL code
against an online Oracle database. You can write code to create and populate
tables and select data from them. It’s a handy way to practice Oracle-specific
SQL online.
40of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
It also includes some helpful scripts as resources in the code library section and
several tutorials on how to improve your SQL.
I use it often when I need a quick way to test some code in Oracle.
W3Schools
Website
It’s not as fully-featured as some other examples here, as it doesn’t have an SQL
editor, but it can help you improve your SQL by completing queries.
41of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
W3Resource
Website
Each of the exercises works off a sample data set and includes an SQL editor
which is just a text box with a Submit button. The exercises include a solution
which shows the correct query and the output.
It seems like a helpful site, but the layout and navigation is a little confusing to
me.
42of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
43of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
StackOverflow offers a tool called Data Explorer. This is a section of their site
that lets you write and run queries against their database, which includes tables
for posts, votes, tags, and more.
There are many saved queries that let you see information about the data in
many areas of StackOverflow. You can also write your own queries.
Website
The Tutorials Point website offers a tool called Coding Ground that lets you
execute SQL online. It’s similar to SQL Fiddle and DB Fiddle, where it has an SQL
editor and a results panel.
It seems to only support SQLite, but that should be enough for basic standard
SQL. You can create and save projects, edit the theme, and change the font size
of the page as well. If you create an account, you can share your SQL code with
others.
44of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQL Course
Website
SQLCourse is a site that has a tutorial on SQL which includes several exercises
at the end of each page. It’s like SQL Bolt but the interface is not as nice and
has several ads on the page.
The SQL editor is a simple textbox at the end of the page, and entering an
incorrect statement will give you a vague error message. It’s useful but there
are other better sites here.
45of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
Tech on the Net is a useful site for learning many programming concepts
including SQL, and they include several practice exercises.
46of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Each exercise includes a sample database with ERD, a question to solve, and an
editor that lets you enter SQL and run it to see the results. It seems pretty easy
to use.
SQL-ex
Website
This Russian-based site has some tutorials on learning SQL as well as a range of
exercises. To access the exercises, you need to create a free account. Once
you’re in, you can see the exercise, sample data, and write SQL queries to solve
the questions.
You’re also able to see the results and see a leaderboard for all questions on the
site. It has some good features, but the site has quite a few ads.
47of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Rextester
Website
Rextester is a simple looking site that allows you to write and run SQL code. You
can run code on many languages, and the SQL languages included are:
• MySQL 5.7.12
• Oracle: 18c
• PostgreSQL: 9.6
You can run SQL code and see the results at the bottom of the page.
SQLize
48of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQLize is a simple site that lets you run MySQL queries and see the results.
There are some limitations, such as a max of 20 rows, but it’s pretty simple to
use. You’re also only allowed to create temporary tables, not actual tables, due
to how it’s designed.
SQL Test
49of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQLTest is an online SQL practice tool that lets you create tables, populate
tables, write SQL queries on them and see the results.
1. Oracle: 11g
2. MySQL: 5.1
3. SQL Server: 2019
It also allows you to select some example code, which automatically populates
the query editor, such as selecting a max value.
Conclusion
So there’s the list of resources for SQL practice questions and tools. Some of
them are full editors that let you create objects and run queries, while others
50of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
just have an SQL editor window with some practice questions. Using a
combination of both can really help you improve your SQL skills.
51of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Rebecca McKeown
• Sql
• Learn Sql
• Online Practice
If you’re currently learning SQL, you may have found yourself knee-
deep in reading material and may be wondering how on earth you
can bridge the gap between book knowledge and real-life SQL
application. In this article, we bring you 12 of the most effective
ways to practice SQL online, taking you from a bookworm to a
database butterfly in no time at all!
52of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
The problem was she had never sat down at a computer in her
life. She had never, ever put into practice a single thing she learned
about computers. She may even not have known how to turn one
on.
53of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
54of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Want to check out the course and see if it’s for you? Simply head on
over and click the “start for free” button to give it a go!
The best way to practice SQL is with our SQL Practice track. It
has 600+ interactive exercises, and we keep adding more!
The bad news? There are almost too many websites out
there with resources claiming to do just that.
55of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
We’ve weeded out the time wasters to bring you the best SQL
websites in the webosphere. This leaves you free to roll up your
sleeves and get your hands dirty with plenty of practice problems
and successful SQL statements.
2. SQL Fiddle
SQL Fiddle is a great place to start if you’re looking to, well, fiddle
around with SQL. A free site that allows you to test and save
queries in several different kinds of SQL, SQL Fiddle is a perfect
way to play around with the queries you have learned to date.
Better still, you can easily link to your query samples, allowing
others to comment and help with any bumps on the road. If you
browse SQL community pages long enough, you’ll see plenty of
people linking to SQL Fiddle; it’s a great way to enlist others to help
you if you have a problem.
56of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
3. SQLZOO
57of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
4. Oracle LiveSQL
Choose the “Start Coding Now” option, and then–if you don’t already
have one–create an Oracle Single Sign On account. With a login,
you’ll be able to save all your work on Oracle LiveSQL.
58of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
5. W3resource
For SQL rookies, the best feature of the site is the stacks of
exercises, undeniably making this a good place to practice SQL
online. From retrieving data, formatting query output, to joins and
everything in between, this is a fantastic place to get in some
serious practice hours.
59of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
6. Stack Overflow
Stack Overflow is like an SQL bible for coding pros. You’ll find every
SQL question you can ever dream of in this active community,
making it a great place to go when you come across a problem you
just can’t seem to solve. Be warned, though: Stack Overflow is not a
place for SQL beginners to ask basic questions. There’s an unspoken
minimal knowledge rule for posting questions about coding issues,
and if you post something that has already been answered on Stack
Overflow, or a question that is easily answered with a quick Google
search, get ready for some sharp-tongued responses from other
users!
60of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Improve your SQL skills with our SQL Practice Set: 88 hands-on
exercises that you can solve in your browser!
7. DB-Fiddle
61of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
8. GitHub
For example, if you will be using one of the Microsoft SQL products
such as SQL Server or Azure SQL Database, it has helpful
information, and there are repositories guiding you through the
learning curve.
62of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
9. Coding Ground
63of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
10. Testdome
Want to know what employers are going to ask you in your SQL-
related interview? Testdome helps you practice SQL skills online
with a huge range of practice interview questions. Not only will
these questions make you a better SQL user, more than 5,000
companies are actually using questions straight from their site–you
may even thank the Testdome gods after your interview!
64of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
11. Data.gov
65of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
How do you get that experience? Well, that brings us to our last–but
certainly not the least– Learn SQL tip: get yourself an SQL gig.
66of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Image: Hackerrank
This may sound too advanced for your beginner SQL skills, but bear
with me.
67of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
My advice? Take a leap of faith and apply for a few entry level SQL
or data-crunching tasks. Keep in mind that it’s not about making
money at this stage. Use the opportunity to learn, to grow your SQL
knowledge and confidence, and to get some experience you can list
on your CV.
68of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
and with this qualification under your belt, you’ll be running SQL
queries in no time!
69of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
https://www.khanacademy.org/computing/computer-programming/sql/sql-basics/v/s-q-l-or-
sequel
I highly recommend this site; it has one example database with tons of different exercises
(with solutions) which show how to do progressively more advanced queries on it. And if you
solve something differently than the solution shows, usually the next exercise says "there's
another way" and shows how you did it. Whenever I thought I had outsmarted the site, I really
hadn't.
https://pgexercises.com/
Also https://www.sqlclimber.com/ .
My favorite: https://selectstarsql.com/
Highly recommend this as it gives real examples from real FAANG companies
https://platform.stratascratch.com/coding
stratascratch.com
Galaxql https://sol.gfxile.net/g3/
programizzzzz
Datalemur is quite good IMHO. The queries are harder than leetcode SQL question on average
but the interface is nicer.
70of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Replit. But you would first need to create the tables and populate the database. It uses SQLite,
not a DBMS.
Oracle has free developer vm preloaded with the database software and you can enable the
Scott tiger dataset to play with it. Oracle also offers an Apex hosted solution for free where you
can try playing with sql.
I’m learning from https://www.learnsql.com. Paid courses are much more detail and shows
you evetything step by step but there are also free courses that you can check.
I mean you could have just googled sql practice. You have a few online tools, here’s onenof
them: https://www.sql-practice.com
Hackthebox
Or you could run SQL locally with Docker and practice there
sqlfiddle.com
Codewars is pretty good. Some questions posted can be hit or miss, but overall it’s good for
practice.
I like learnsql.com
sqlcourse.com
I bet there's a lot of docker containers out there that just have ready-made sql databases on
them.
https://sqlbolt.com/
Sql-practice.com
Try Leetcode and Interviewbit, they used to have good amount of SQL questions.
I liked SQL Island when I was back in school. https://sql-island.informatik.uni-kl.de You can
change the language under the menu point “sprache wechseln”
71of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
1. HackerRank
From software engineering to data analytics, HackerRank is one of the best platforms for
practicing coding interview questions. HackerRank’s SQL practice suite has hundreds of
questions available for you to practice.
You can filter the questions by their difficulty levels: easy, medium, and hard. Alternatively,
depending on your comfort level, you can choose to practice questions on basic, intermediate,
and advanced SQL topics. In addition, you can filter the practice questions by topics, such as
select queries, joins, and aggregations.
After practicing, you can also take HackerRank’s Skills Certification Test to test your SQL skills.
These tests are timed assessments that require you to solve SQL questions within a time limit.
Currently, the following SQL assessments are available:
SQL Basic tests you on simple queries, relationships, and aggregations.
SQL Intermediate covers joins, unions, and subqueries.
SQL Advanced includes query optimization, modeling, indexing, and window functions.
You can access the whole collection of practice questions and assessments with a free account
on the platform.
2. SQLPad
72of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
3. StrataScratch
StrataScratch, another popular practice platform for SQL interviews, has a huge collection of
SQL interview questions. In addition to filtering by topics and difficulty level, you can filter
through the list of the questions to get company-specific SQL interview questions.
Their coding workspace supports PostgreSQL, MySQL, and Microsoft SQL Server (in beta). If
Python is your preferred programming language, you can use pandas to solve the questions.
Under the free tier, you can access up to 50 questions with solutions, and attempt over 500 SQL
questions.
4. DataLemur
DataLemur has a curated collection of SQL interview questions that have appeared in
interviews in tech companies like LinkedIn, Tesla, Microsoft, and Walmart among others.
The platform has over 40 SQL interview questions on topics such as conditional aggregation,
string and window functions, and cumulative sums.
5. LeetCode
If you are a Leetcode user, you can practice SQL on it too. The collection of SQL questions on
LeetCode is quite diverse, with varying difficulty levels and topics. You can also filter questions
by the tag: the tags correspond to the names of the companies. However, you can access only a
subset of the questions with a free account.
6. Mode
If you are looking for a SQL learning platform where you can practice as you learn, then Mode
can be a great choice. The Mode SQL tutorial has one of the most comprehensive and
thoughtfully structured curriculum.
The Mode SQL tutorial into is divided into the following sections:
73of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Basic SQL
Intermediate SQL covering joins, unions, and aggregate functions
Advanced SQL covering topics like SQL subqueries, string functions, window functions,
and pivoting
Each lesson has several practice questions that you can solve in the Mode SQL editor.
7. SQLZoo
SQLZoo is another learning and practice platform for SQL. On SQLZoo, you can access bite-sized
lessons to learn SQL: from basic SELECT statements to more advanced concepts like window
functions. There are short practice exercises embedded into each of the lessons. To put your
SQL skills to test, there’s a dedicated assessment section that has more involved SQL
questions.
74of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Are you looking for places to practice SQL online? This list contains many
different websites that have SQL practice functionality.
Table of Contents
75of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQLZoo
Website
SQLZoo is a popular site for practising SQL. It has a large range of practice
exercises, from basic SELECT statements to more complicated queries.
Each page has a sample data set and several questions. You can enter the SQL
that you think is needed to give the answer that is asked for, submit the SQL,
and see the result. It also indicates if the result is correct or not.
76of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQL Fiddle
77of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
78of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQL Fiddle is a popular site for quickly generating sample databases and writing
SQL code on them. It can also be used for SQL practice. It’s a common way for
users on StackOverflow to generate sample data because the data sets are
saved on SQLFiddle and you can generate a link to that data set.
MySQL 5.6
Oracle 11g R2
PostgreSQL 9.6 and 9.3
SQLite
MS SQL Server 2017
DB-Fiddle
79of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
DB-Fiddle is one of two sites called “DB Fiddle”. This one is similar to the other
fiddles in that it lets you create tables, insert data, and run queries.
You can sign in to create an account, save your fiddles, and make them public or
private.
80of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
DB<>Fiddle
Website
This site is another “fiddle” site where you can enter your sample queries and
run them to see the results.
It has a sample database feature, which shows AdventureWorks for SQL Server,
and there are many other SQL versions supported:
HackerRank
81of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
HackerRank is a site that allows you to practice your skills in many different
languages, and one of the languages provided is SQL.
There are many different SQL challenges on the site, and each of them has a
sample data set, a question to answer with SQL, a list of the submissions, a
leaderboard, and discussions.
82of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Exercises are broken down by difficulty and you’re able to write the SQL in DB2,
MySQL, Oracle, and SQL Server.
SQL Bolt
83of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQL Bolt is a site that teaches SQL as well as including several exercises on
each concept. At the end of each page is a sample data set, and several
questions you can answer using SQL.
While it doesn’t have the same flexibility as an online editor like SQLFiddle, it
does explain the concepts and includes SQL practice exercises which are
helpful. It’s a popular resource for people to practice.
Website
Oracle Live SQL is a tool created by Oracle that lets you write and run SQL code
against an online Oracle database. You can write code to create and populate
tables and select data from them. It’s a handy way to practice Oracle-specific
SQL online.
84of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
It also includes some helpful scripts as resources in the code library section and
several tutorials on how to improve your SQL.
I use it often when I need a quick way to test some code in Oracle.
W3Schools
Website
It’s not as fully-featured as some other examples here, as it doesn’t have an SQL
editor, but it can help you improve your SQL by completing queries.
85of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
W3Resource
Website
Each of the exercises works off a sample data set and includes an SQL editor
which is just a text box with a Submit button. The exercises include a solution
which shows the correct query and the output.
It seems like a helpful site, but the layout and navigation is a little confusing to
me.
86of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
87of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
StackOverflow offers a tool called Data Explorer. This is a section of their site
that lets you write and run queries against their database, which includes tables
for posts, votes, tags, and more.
There are many saved queries that let you see information about the data in
many areas of StackOverflow. You can also write your own queries.
Website
The Tutorials Point website offers a tool called Coding Ground that lets you
execute SQL online. It’s similar to SQL Fiddle and DB Fiddle, where it has an SQL
editor and a results panel.
It seems to only support SQLite, but that should be enough for basic standard
SQL. You can create and save projects, edit the theme, and change the font size
of the page as well. If you create an account, you can share your SQL code with
others.
88of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQL Course
Website
SQLCourse is a site that has a tutorial on SQL which includes several exercises
at the end of each page. It’s like SQL Bolt but the interface is not as nice and
has several ads on the page.
The SQL editor is a simple textbox at the end of the page, and entering an
incorrect statement will give you a vague error message. It’s useful but there
are other better sites here.
89of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
Tech on the Net is a useful site for learning many programming concepts
including SQL, and they include several practice exercises.
90of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Each exercise includes a sample database with ERD, a question to solve, and an
editor that lets you enter SQL and run it to see the results. It seems pretty easy
to use.
SQL-ex
Website
This Russian-based site has some tutorials on learning SQL as well as a range of
exercises. To access the exercises, you need to create a free account. Once
you’re in, you can see the exercise, sample data, and write SQL queries to solve
the questions.
You’re also able to see the results and see a leaderboard for all questions on the
site. It has some good features, but the site has quite a few ads.
91of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Rextester
Website
Rextester is a simple looking site that allows you to write and run SQL code. You
can run code on many languages, and the SQL languages included are:
MySQL 5.7.12
Oracle: 18c
PostgreSQL: 9.6
You can run SQL code and see the results at the bottom of the page.
SQLize
92of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQLize is a simple site that lets you run MySQL queries and see the results.
There are some limitations, such as a max of 20 rows, but it’s pretty simple to
use. You’re also only allowed to create temporary tables, not actual tables, due
to how it’s designed.
SQL Test
93of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Website
SQLTest is an online SQL practice tool that lets you create tables, populate
tables, write SQL queries on them and see the results.
Oracle: 11g
MySQL: 5.1
SQL Server: 2019
It also allows you to select some example code, which automatically populates
the query editor, such as selecting a max value.
Conclusion
So there’s the list of resources for SQL practice questions and tools. Some of
them are full editors that let you create objects and run queries, while others
94of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
just have an SQL editor window with some practice questions. Using a
combination of both can really help you improve your SQL skills.
95of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Rebecca McKeown
Sql
Learn Sql
Online Practice
If you’re currently learning SQL, you may have found yourself knee-
deep in reading material and may be wondering how on earth you
can bridge the gap between book knowledge and real-life SQL
application. In this article, we bring you 12 of the most effective
ways to practice SQL online, taking you from a bookworm to a
database butterfly in no time at all!
96of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
The problem was she had never sat down at a computer in her
life. She had never, ever put into practice a single thing she learned
about computers. She may even not have known how to turn one
on.
97of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
98of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Want to check out the course and see if it’s for you? Simply head on
over and click the “start for free” button to give it a go!
The best way to practice SQL is with our SQL Practice track. It
has 600+ interactive exercises, and we keep adding more!
The bad news? There are almost too many websites out
there with resources claiming to do just that.
99of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
We’ve weeded out the time wasters to bring you the best SQL
websites in the webosphere. This leaves you free to roll up your
sleeves and get your hands dirty with plenty of practice problems
and successful SQL statements.
2. SQL Fiddle
SQL Fiddle is a great place to start if you’re looking to, well, fiddle
around with SQL. A free site that allows you to test and save
queries in several different kinds of SQL, SQL Fiddle is a perfect
way to play around with the queries you have learned to date.
Better still, you can easily link to your query samples, allowing
others to comment and help with any bumps on the road. If you
browse SQL community pages long enough, you’ll see plenty of
people linking to SQL Fiddle; it’s a great way to enlist others to help
you if you have a problem.
100of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
3. SQLZOO
101of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
4. Oracle LiveSQL
Choose the “Start Coding Now” option, and then–if you don’t already
have one–create an Oracle Single Sign On account. With a login,
you’ll be able to save all your work on Oracle LiveSQL.
102of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
5. W3resource
For SQL rookies, the best feature of the site is the stacks of
exercises, undeniably making this a good place to practice SQL
online. From retrieving data, formatting query output, to joins and
everything in between, this is a fantastic place to get in some
serious practice hours.
103of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
6. Stack Overflow
Stack Overflow is like an SQL bible for coding pros. You’ll find every
SQL question you can ever dream of in this active community,
making it a great place to go when you come across a problem you
just can’t seem to solve. Be warned, though: Stack Overflow is not a
place for SQL beginners to ask basic questions. There’s an unspoken
minimal knowledge rule for posting questions about coding issues,
and if you post something that has already been answered on Stack
Overflow, or a question that is easily answered with a quick Google
search, get ready for some sharp-tongued responses from other
users!
104of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Improve your SQL skills with our SQL Practice Set: 88 hands-on
exercises that you can solve in your browser!
7. DB-Fiddle
105of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
8. GitHub
For example, if you will be using one of the Microsoft SQL products
such as SQL Server or Azure SQL Database, it has helpful
information, and there are repositories guiding you through the
learning curve.
106of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
9. Coding Ground
107of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
10. Testdome
Want to know what employers are going to ask you in your SQL-
related interview? Testdome helps you practice SQL skills online
with a huge range of practice interview questions. Not only will
these questions make you a better SQL user, more than 5,000
companies are actually using questions straight from their site–you
may even thank the Testdome gods after your interview!
108of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
11. Data.gov
109of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
How do you get that experience? Well, that brings us to our last–but
certainly not the least– Learn SQL tip: get yourself an SQL gig.
110of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Image: Hackerrank
This may sound too advanced for your beginner SQL skills, but bear
with me.
111of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
My advice? Take a leap of faith and apply for a few entry level SQL
or data-crunching tasks. Keep in mind that it’s not about making
money at this stage. Use the opportunity to learn, to grow your SQL
knowledge and confidence, and to get some experience you can list
on your CV.
112of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
and with this qualification under your belt, you’ll be running SQL
queries in no time!
113of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
https://www.khanacademy.org/computing/computer-programming/sql/sql-basics/v/s-q-l-or-
sequel
I highly recommend this site; it has one example database with tons of different exercises
(with solutions) which show how to do progressively more advanced queries on it. And if you
solve something differently than the solution shows, usually the next exercise says "there's
another way" and shows how you did it. Whenever I thought I had outsmarted the site, I really
hadn't.
https://pgexercises.com/
Also https://www.sqlclimber.com/ .
My favorite: https://selectstarsql.com/
Highly recommend this as it gives real examples from real FAANG companies
https://platform.stratascratch.com/coding
stratascratch.com
Galaxql https://sol.gfxile.net/g3/
programizzzzz
Datalemur is quite good IMHO. The queries are harder than leetcode SQL question on average
but the interface is nicer.
114of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Replit. But you would first need to create the tables and populate the database. It uses SQLite,
not a DBMS.
Oracle has free developer vm preloaded with the database software and you can enable the
Scott tiger dataset to play with it. Oracle also offers an Apex hosted solution for free where you
can try playing with sql.
I’m learning from https://www.learnsql.com. Paid courses are much more detail and shows
you evetything step by step but there are also free courses that you can check.
I mean you could have just googled sql practice. You have a few online tools, here’s onenof
them: https://www.sql-practice.com
Hackthebox
Or you could run SQL locally with Docker and practice there
sqlfiddle.com
Codewars is pretty good. Some questions posted can be hit or miss, but overall it’s good for
practice.
I like learnsql.com
sqlcourse.com
I bet there's a lot of docker containers out there that just have ready-made sql databases on
them.
https://sqlbolt.com/
Sql-practice.com
Try Leetcode and Interviewbit, they used to have good amount of SQL questions.
I liked SQL Island when I was back in school. https://sql-island.informatik.uni-kl.de You can
change the language under the menu point “sprache wechseln”
115of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
116of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Most people suck at SQL. Why? Because schools do a horrible job teaching it. Luckily, learning
SQL is simple – if you know where to start. And unlike college, it won't cost you $120k. Use
these 6 dead-simple steps to 10x your SQL skills (without the student loans):
New to data analytics? It's a fantastic career for people that want to work from anywhere and
earn a high salary. And SQL is *the* most powerful tool in the data analytics toolbox. Here are 7
SQL cheatsheets so you don't have to memorize the basics:
1) SQL Cheatsheet by
@swapnakpanda
This cheat sheet covers the basics like querying and joins, but also includes some data modeling
and data definition commands as well. Definitely worth checking out:
117of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
wears off for the day! Use Steve Stedman's MySQL JOIN Types cheat sheet to save time
and avoid confusion on your next #MySQL project:
118of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
119of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
3) SQL Cheatsheet by
@AbzAaron
This one-pager cheat sheet has a good set of examples of SQL syntax and commands:
120of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
4) SQL Cheatsheet by
@yosracodes
This cheat sheet shows slightly more advanced SQL syntax, covering topics like set operations,
working with duplicates, triggers, and more:
121of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
122of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
5) SQL Cheat Sheet by http://sqltutorial.org This SQL cheat sheet provides you with the most
commonly used SQL statements for quick reference:
123of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
124of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
125of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Brian Graves
@NewPrediction
·
Sep 7, 2022
7) SQL Commands Cheat Sheet by
@Intellipaat
This cheat sheet will guide you through the common SQL commands, plus syntax examples and
a clear description of each one.
126of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
127of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
With the basic syntax out of the way, it's time to practice. Use these 8 free websites to establish
a daily practice routine in 30 minutes or less (even if you think "Excel is good enough"):
Learning SQL is an absolute must for aspiring data analysts. Fortunately, there are places online
where you can learn this invaluable skill – without paying a penny. Here are 8 free websites to
sharpen your SQL skills:
4) KDNuggets Learn how to create a table, insert values, and use SQL commands to solve
this case study. Learn more: http://t.ly/sql-case-study
5) InterviewQuery Work through example business issues, define metrics, and write the
SQL to solve each problem. Learn more: http://interviewquery.com/p/sql-case-study
6) Select Star SQL Aims to be the best place on the internet for learning SQL. A great option
for beginners! Learn more: http://selectstarsql.com
7) http://SQLTutorial.org Get started with SQL quickly and effectively through many
practical examples.
8) Mode SQL Tutorial Learn to answer questions with data using SQL. No coding
experience is necessary. Learn more: http://mode.com/sql-tutorial
9) 8WeekSQLChallenge Practice solving 8 real-world business problems across 8 well-
crafted case studies. Learn more: http://8weeksqlchallenge.com
10) W3 Schools SQL Tutorial Another good one for beginners, W3 Schools covers all of the
SQL basics in bite-sized lessons. Learn more: http://w3schools.com/sql
11) DataLemur Practice SQL Interview questions asked by top tech companies for free on
DataLemur. Made by @NickSinghTech , Best-Selling Author of Ace the Data Science
Interview Learn more: http://datalemur.com
128of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
129of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
130of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
131of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Even Ivy League schools don't offer mentorship and accountability. And that's why I've created
Solving With SQL:
• Master SQL fundamentals in 30 days
• Learn alongside other data professionals
• Mentorship and accountability to keep you focused
https://t.co/ob4ydcw5de
solvingwithsql.com
Every data analyst should have an online data analytics portfolio that showcases their best work
to recruiters 24/7. The problem? Most people don't know how to build one. Here are 6 steps to
get you started:
4. Start with skills that employers want to see You can shortcut the interview process by
thinking like a manager. There are 10 specific skills that employers WANT to hire for.
Check them out here at no cost to you:
https://t.co/l3AgjKpIcE
132of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
5. Find a portfolio-ready dataset Many beginner data analysts have trouble finding a
usable data set for their portfolio. It’s not your fault. Most data sets aren’t very good for
creating portfolio-worthy projects. Here's a MUCH better method:
https://t.co/wLDPMeNHCT
6. Create 3-5 projects in your dream industry Once you have a good dataset, it's time to
get building. I recommend these tech skills: – SQL – Tableau – Excel – Python I wrote
about this in Chapter 8 of The Data Analytics Portfolio Playbook:
https://t.co/92keJrKgCz
7. Create a project write-up Your data analytics portfolio should leave the reader with a
sense of how you solve problems using data: – focus on the audience – less is more
Read more here (also in chapter 6 of my ebook)
https://t.co/XJMilA3hdT
8. Publish your work Congrats – you've created a few projects! Now it's time to publish
your work. Follow The 60-Minute Rule: Your data analytics portfolio shouldn't take
longer than 1 hour to set up online. My step-by-step guide (free):
https://t.co/m9hnFd0emi
9. Share it with the world Your online data analytics portfolio is working 24/7 to show your
best work.
• add to social media
• send a tweet & tag me
• add to your resume/CV
• add to your email signature
133of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
https://www.reddit.com/r/learnSQL/comments/zybk5o/
2023_update_the_best_resources_for_learning_sql/
2023 Update: The Best Resources for Learning SQL
As an experienced software engineer with over 7 years of experience, I want to share with you
the list of resources I used to learn SQL. I have found these resources to be extremely helpful in
my own learning journey and they can be of great value to others as well. Whether you are a
beginner looking to get started with SQL or an experienced developer looking to refresh your
knowledge, these resources will provide you with the necessary foundation and skills to
become proficient in SQL. So, without further ado, here is my list of top resources for learning
SQL:
4. The SQL courses offered by Standford on EDX and instructed by Jennifer Widom are
suitable for both beginners and experienced software engineers looking to refresh their
knowledge. These courses are free and provide a comprehensive education in SQL,
covering a wide range of topics from the fundamentals to advanced concepts such as
introduction to relational databases, advanced topics in SQL, Modeling and theory and
Semistructured Data. Through interactive quizzes, hands-on exercises, and real-world
examples, these courses provide valuable insights and practical skills for anyone looking
to learn or improve their SQL skills.
5. Database Systems The Complete Book is an excellent resource for advanced topics in
database systems, including database system implementation, data mining, concurrency
control, transaction management, and parallel and distributed databases. While the first
part of the book serves as a good foundation, the advanced topics covered in the later
sections are particularly noteworthy. I have had this book for several years and continue
to refer back to it on a regular basis. If you are looking to master advanced concepts
related to RDBMS and SQL in particular, I highly recommend adding this book to your
library. It will be a valuable resource in your journey towards expertise in database
systems.
6. The sixth edition of Database System Concepts is a widely respected text in database
education. It introduces basic and fundamental concepts in a straightforward manner
and aims to help students start working with databases as soon as possible. The book is
divided into ten sections, covering topics such as relational databases, system
architecture, speciality databases, and transaction management. It also includes
chapters on object-relational mapping, relevance ranking using terms, and distributed
data storage. This edition includes revised coverage of SQL, with a focus on the
variations of SQL used in actual systems and SQL features. It also introduces new
material on support vector machines and the validation of classifiers. The text
134of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
135of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
https://datalemur.com/blog/learn-sql-in-30-days-roadmap
136of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
137of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Word of advice: actually do every single SQL exercise in W3. While they aren't tough, there is a
world of difference between reading a SQL tutorial,, and actually DOING the exercises from the
SQL tutorial!
138of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
139of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
These more open-ended questions will force you to combine and apply multiple SQL concepts
which is a MUST for those learning SQL who hope to land Data Analytics & Data Science jobs.
Week 4: SQL Interview Prep on DataLemur
Put your SQL knowledge to the test on DataLemur by practicing the 60+ real SQL interview
questions
https://datalemur.com/sql-interview-questions
asked by companies like Facebook & Google. Each question comes with a full solution and
multiple hints, and you can filter the question list based on which SQL pattern the problem
uses.
140of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
DataLemur also a comprehensive SQL Interview Guide for Data Analysts with tips on how to
approach tricky SQL interview questions.
https://api.datalemur.com/assets/296c5a73-7079-4ccb-9ef1-7a4ec0c7920c
To start practicing, try the easy Amazon SQL interview question below.
https://datalemur.com/questions/sql-avg-review-ratings
141of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Since you're in a hurry, you'll also like this guide on cramming for SQL interviews, which covers
how to study for a SQL assessment if you've only got a few hours or few days to prep.
If this 30-day plan seems like too much work, I have an easier 7-day SQL study roadmap too.
Can You Learn SQL In 1 Week?
It’s reasonable to learn the basics of SQL in one week, especially if you have past programming
experience in a language like Python or R. By spending 2 hours a day, you’ll be able to finish this
14-hour SQL study plan in just 7 days.
Day 1: Do lessons 1 through 5 on SQL Bolt, covering select, and filtering & sorting query
results. [Image]
Day 2: Do lessons 6 and 7 on SQL Bolt, covering SQL joins. Learn about the different join
types visually.
Day 3: Do lessons 8 to 11 on SQL Bolt, covering NULL handling, along with aggregate
functions like SUM and COUNT.
Day 4: Do as many of the basic SQL lessons in the Mode SQL tutorial as you can to
refresh your knowledge.
142of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Day 5: Finish the basic SQL lessons on Mode, and try to do as many of the intermediate
SQL lessons as you have time for.
Day 6: Solve the first case study from Danny Ma’s 8 Week SQL Challenge. This will help
you apply your SQL knowledge to one specific problem.
Day 7: Practice 5 easy SQL Interview questions on DataLemur to test your SQL skills, and
identify any gaps in your knowledge.
Got More Than 30 Days? Become a SQL Expert!
Let’s face it – 30 days is enough to start with SQL, but not enough to master SQL. If you’ve got
more than a month, check out the SQL book recommendations in the list 17 Best Books for
Data Analysts.
143of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
https://www.acethedatascienceinterview.com/best-books-for-data-analysts
17 Best Books for Data Analysts
17 Must-Read Data Analytics Books For Data Analysts
Here's 17 Data Analytics books we recommend every serious Data Analyst reads. Trust us when
we say these books are a must-read – as the best-selling authors of Ace the Data Science
Interview and creators of Data Analytics Interview Practice Platform DataLemur we've read our
fair share of Data Analytics books and these truly are the 17 best books on Statistics, SQL,
Business Analytics, and Job Hunting out there for Data Analysts.
What are the best books to learn Data Analytics?
The 3 best books to learn Data Analytics are Advancing Into Analytics for people who know
Excel well, R for Data Science for a practical introduction to Data Analytics in R, and Data
Science for Business to learn how data analytics is applied to solve real-world business
problems.
Advancing Into Analytics: From Excel to Python and R
If your a new Data Analyst, and you don’t have any programming experience but are handy at
Excel, Advancing Into Analytics by George Mount is the perfect gentle introduction to using R &
Python for analytics. By covering fundamental concepts in Excel first, and then showing how
they directly translate into a programming language, this book eases you into data analytics
making it the best book for beginner Data Analysts.
R for Data Science: Import, Tidy, Transform, Visualize, and Model Data
Don't let the word "Data Science" in the book title for R for Data Science scare you – this book is
the perfect hands-on introduction to both Data Science AND Data Analytics. The book does a
great job balancing implementation details in R while also giving you a big-picture
understanding of the data analytics process. See for yourself - the author graciously made
the book free online. One caveat: if you do have previous experience with programming in R, go
read Advancing into Analytics first
Data Science for Business: What You Need to Know about Data Mining and Data-Analytic
Thinking
Data Science for Business is a great conceptual introduction to Data Analytics and Data Science.
The authors do a great job showing you how Data Analytics impacts day-to-day business
decisions. However, this books lacks practical exercises and code snippets, making it not a great
hands-on book to learn Data Analytics. That said, having the correct mental models for Data
144of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Analytics is important, and being able to connect high-level data analysis techniques to high-
level business problems is a crucial skill, so we do think it's still worth reading for Data Analysts.
145of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
statistics formulas or complicated math – instead, it serves as a mental model on how to use
statistics well, and guard against its misuse.
Practical Statistics for Data Scientists: 50+ Essential Concepts Using R and Python
For Data Analysts trying to master statistics, Practical Statistics for Data Scientists is a must-read
book. This book provides a clear and concise introduction to the fundamental concepts of
statistics, and has 50+ code examples in Python and R which demonstrate statistical theory. We
LOVE this book, because it makes you a better programmer AND a better statistician at the
same time, and you'll easily be able to ace probability and statistics interview questions after
reading this book!
146of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
SQL shows up in most Data Analyst job listings, so if you don't know this important
skill, Practical SQL: A Beginner's Guide to Storytelling with Data is the best book for Data
Analysts to start learning SQL. Written by Anthony DeBarros, a data journalist at the Wall Street
Journal, this book has a particular focus on using SQL to extract insights from data which can
help you uncover a story. The real-world case studies mimic the day-to-day work Anthony does
at WSJ, which makes this book an extremely practical way to learn SQL.
SQL for Data Scientists: A Beginner's Guide for Building Datasets for Analysis
SQL for Data Scientists is one of the best SQL books specifically geared towards Data Scientists
and Data Analysts. Unlike other books, which cover SQL broadly because they are written for a
Database Administrator or Back-end Software Engineer, this book focuses on the subset of SQL
skills that data analysts and data scientists use frequently, like joins, window functions,
subqueries, and preparing your data for Machine Learning.
While this book isn't exactly for SQL interview prep, I do think it covers 90% of the technical
concepts that SQL interviews cover. For a more comprehensive guide on how to get interview
ready, read the Ultimate SQL Interview Guide:
147of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Minimum Viable SQL Patterns
Minimum Viable SQL Patterns is an e-book by Ergest Xheblati, a former Business Intelligence
Analyst turned Data Architect. I recommend this book to Data Analysts who are trying to take
their SQL to the next level. By focusing on the workflows and patterns that repeat themself day-
to-day, the book will have you writing clean and efficient code to solve the most common
workplace SQL problems you'll encounter.
What are the best books for your Data Analytics career?
The 4 best books for Data Analysts who are trying to land their dream job in Data Analytics are
How to Get a Job in Analytics, Ace the Data Science Interview, Build a Career in Data Science,
and the Startup of You.
How to Get a Job in Data Analytics
In the e-book How to Get a Job in Data Analytics, author Michael Dillon interviews 40
professionals in the Data Analytics industry on how to break-in. Michael is a Data Analyst for
Manchester United, and previously was a poker player and trader, so he's intimately familiar
with transitioning into the field.
148of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
149of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
If you're looking for the eBook of Ace the Data Science Interview, we're sorry to announce that
there aren't any online PDF or Kindle downloads of Ace the Data Science Interview available.
150of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
However, you can read many of the SQL interview tips in my 5,000-word SQL interview guide.
You can also solve many of the data interview questions from the book are on DataLemur - a
SQL & Data Science interview platform. For example, you'll find 100+ SQL Interview Questions
from FAANG on there to practice with!
151of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
The Startup of You: Adapt, Take Risks, Grow Your Network, and Transform Your Career
Drawing on the best career advice Silicon Valley has to offer, the book "The Startup of You"
helps you think of your Data Analytics career in a more entrepreneurial and scrappy light.
Written by Reid Hoffman, Founder of LinkedIn turned VC at Greylock, the book challenges
traditional career advice in many places because it argues we no longer live in a world where
it's reasonable to work at one company for 30 years and retire with a pension. In today's fast-
moving world of Data Analytics & Technology, there's a new set of rules for career success, and
the Startup of You explains exactly how to tranform your career in this new age.
152of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Had the same question a few weeks ago. Some bloggers advise kaggle.com but I
prefer stratascratch.com. You can solve different learning tasks and debate various solutions
that other students suggest. It seems great for novice
Try SQL Questions on DataLemur. It has 70+ free questions asked by real tech companies, and
each question comes with multiple hints so it’s a great way to practice and learn.
These seem to be great resources. As an SQL professor for over 20 years I recommend the
following free resource: Learn SQL Free
The following course is excellent! It provides a hands- on experience and the instructor is very
active in the course with answering questions. The course covers Introduction through
Advanced SQL.
SQL Certificate
Recently came across this youtube channel (https://youtube.com/@EverydayDataScience)
where you can find step by step solution of close to 300 questions from Leetcode,
Stratascratch, DataLemur etc.
So EDX has quite a good coverage of JOIN here: https://learning.edx.org/course/course-
v1:StanfordOnline+SOE.YDB-SQL0001+2T2020/home.
if you want more than this both, the database system concepts and database system the
complete book have very extensive coverage of JOIN queries.
Can you recommend software with a GUI to practice SQL (and relational database schemas as a
whole really) for a MacBook? I’ve downloaded a few things and nothing is what I want. I just
want an easy to set up SQL playground I suppose. I hope I was detailed enough with my
question.
coding_the_future
OP·4 mo. ago·edited 4 mo. ago
Sure, it really depends on the SQL usage you're doing but here is my list:
1. for vscode users - SQLTools - an excellent extension that allows you to connect to almost
every relational database out there, run queries and get visualized results.
2. for MySQL/MariaDB users - phpMyAdmin - this was the first Database GUI tool I've ever
used, it's an extremely powerful GUI tool with a lot of functionalities, check it out.
3. for Postgres, I use pgAdmin4 - a super user-friendly GUI tool that covers everything a
database admin needs.
153of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
4. when I wrote this blog post I used SQLiteStudio, which is a minimalistic GUI tool around
SQLite3, yet quite powerful.
These all are open-source tools for open-source databases, if you're using MS SQL for example,
they have wonderful GUI tools.
I Created a full manual for SQL in GitHub as repo, And the topics is:
Introduction to databases and SQL
Data Types and Data Definition
Creating and modifying database objects
Data manipulation
Aggregate functions
Subqueries and joins
Transactions and concurrency
Stored procedures and triggers
Advanced topics
The link is here: https://github.com/AmmarAbdelhalem/FSM
If you find these useful support me with star and share it with your friends
https://sqlzoo.net/wiki/SQL_Tutorial
Then
https://mode.com/sql-tutorial/
Then
All the leetcode database questions!
https://leetcode.com/problemset/database/
I'm a big fan of the software carpentry courses, which have been presented hundreds of times
with improvements made based on constant feedback from students.
Here's their SQL course: https://swcarpentry.github.io/sql-novice-survey/
154of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
26
Posted by
u/P_01y
3 months ago
Excellent. This is a great breakdown of the introductory, intermediate and advanced skills for
each level of SQL learning.
CREATE VIEW falls somewhere in there too. :)
Thanks.
155of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
156of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
157of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
From Day 7 to Day 12, you’ll take a step forward and learn a few advanced concepts like nested
queries, wildcard operators, and other clauses.
WITH Clause: Understanding the concept of with clause and using it to give the
sub-query block a name.
FETCH Clause: It will fetch the filtered data based upon certain conditions like
fetching only the top 3 rows.
Arithmetic Operators: Using arithmetic operators to filter the data conveniently
and precisely.
Wildcard Operators: To intelligently select the exact data like names starting or
ending with T.
UPDATE Statement: Updating certain data entries based upon the condition
provided.
ALTER Table: Adding, dropping, or modifying table based on the given condition.
LIKE Clause: It will follow the pattern given on the condition for search.
BETWEEN and IN operator: It will select the data range between or in the given
condition.
CASE Statement: It will check for the conditionals and will query the data as per
the respective case.
EXISTS: It will form the nested query to filter out the data which exists in another
query.
Day 13 to Day 18:
From Day 13 to Day 18, you’ll be mainly learning the Aggregate functions in SQL.
DISTINCT Clause: It will select only the distinct data, not repetitive.
Count Function: Returns the total count of the data filtered.
Sum Function: Return the sum of all the data being queried.
Average Function: Return the average of all the data being queried.
Minimum Function: It will return the minimum data from the whole data that is
being queried.
Maximum Function: It will return the maximum data from the whole data that is
being queried.
ORDER BY: This statement will order the queried data as per your convenience
like in ascending or descending order.
GROUP BY: This statement will group all your queried data with the column given
in the condition.
ALL and ANY Clause: They are logical operators in SQL and return boolean value
as a result.
TOP Clause: Used to fetch the limited number of rows from a database.
Day 19 to Day 24:
From Day 19 to 24, you’ll be learning and practicing the Joins in SQL. It is one of the most
important concepts of SQL.
Union Clause: Just like the mathematical union operator, this clause will make the
union of the tables given.
158of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
Intersection Clause: It will join the two or more tables where they are
intersecting.
Aliases: It will give an alias to the table which we can refer to as later.
Cartesian Join and Self Join: Sometimes to query out some data, we have to self
join the table to itself.
Inner, Left, Right and Full Joins: These four types of join come into play when we
have to join one table with another. Look upon their syntax and learn to deal with
these joins.
Division Clause: Division is typically required when you want to find out entities
that are interacting with all entities of a set of different types of entities.
Using Clause: If several columns have the same names but the datatypes do not
match, the NATURAL JOIN clause can be modified with the USING clause to
specify the columns that should be used for an EQUIJOIN.
Combining values: Combining aggregate and non-aggregate values in SQL using
Joins and Over clauses.
MINUS Operator: It is used as “except” which means it will join the two
intersecting tables and will minus one table so that only the intersection and the
other table is covered.
Joining 3 or more tables: Although used very rarely, this will make you learn and
understand how to join 3 or more tables and then carry out the querying
operations.
Day 25 to Day 30:
Miscellaneous: Since we have covered almost all the topics, we shall now move on to some
of the miscellaneous topics, concepts, and functions. These are important parts of DBMS and
SQL and will surely help you in your college exams and competitive exams like GATE CS.
Views
Creating Roles
Constraints
Transactions
Mathematical functions
Date functions
Conditional Expressions
General functions
String functions
Conversion Function
Top-N Queries
Advanced Functions
159of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
There are lots of places to learn syntax, the harder part for me honestly was learning how to
make queries go faster. One of the things I hate most about SQL is that it's sold as a declarative
programming language - just describe "what" you want in code not "how" - yet to get real
performance you need to learn how to write your queries "properly" and index this, not that,
etc. It's all very passive aggressive.
Still, over time I've come to appreciate relational databases and how capable they are when
you're able to properly define the problem domain into sets of schemas. Some of my favorite
SQL resources are:
https://www.brentozar.com/blog/
https://blog.sqlauthority.com/
https://use-the-index-luke.com/
Finally, SQLFiddle is a really cool site for learning and testing SQL problems since you can create
a database schema, fill it with a small amount of data, and practice writing code against it
without needing to install anything. And it supports multiple SQL database flavors.
Hmm, well a lot of it depends on what you're trying to do. In the relational database space,
here are some keywords/concepts you could look into further if you're feeling rudderless.
Transactional database design - this is like your standard design for databases with user
input (store/change user profile info, etc.)
Dimensional Modeling - commonly used for analytical-focused databases, such as
writing reports.
Star Schema/Snowflake Schema - terms related to dimensional modeling, they describe
ways to design a database for more efficient analytical querying
Database Normalization - structuring your tables to reduce duplication of data and the
complexities that come with it.
Database Denormalization - the opposite of normalization. Which one is 'best' depends
on a lot of different things (yes, duplication can be good if the trade-offs are worth it), so
learning both will help you choose the appropriate design for your scenario.
160of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
would gather this information for you but theyre a bit out of date, and I wouldn’t want to waste
your time with that. That being said we had DB Design, SQL, Data Warehouse, Different SQL
technologies, and several administration courses (I was specifically going to school to be a
database admin, just ended up being mostly a developer).
However, I think these two books still stand out, even though the exams theyre meant to
prepare you for no longer exists either (but way more current)
https://www.amazon.com/Exam-70-764-Administering-Database-Infrastructure/dp/
1509303839/ref=sr_1_13?
keywords=microsoft+database+exam+prep&qid=1636720202&qsid=137-4185680-
1014407&sr=8-13&sres=1576105199%2CB07W51LSWH
%2C1549540513%2C0137252161%2C1838985689%2C1800568576%2C1509304339%2C111864
395X%2C111963363X%2CB075XRXK3T%2CB00B4JZDLC%2CB00EKYR15E
%2C1119359341%2C0735623775%2CB09C6QKKS9%2C1789348013&srpt=ABIS_BOOK
https://www.amazon.com/Exam-70-761-Querying-Data-Transact-SQL/dp/1509304339/
ref=sr_1_9?keywords=microsoft+database+exam+prep&qid=1636720202&qsid=137-4185680-
1014407&sr=8-9&sres=1576105199%2CB07W51LSWH
%2C1549540513%2C0137252161%2C1838985689%2C1800568576%2C1509304339%2C111864
395X%2C111963363X%2CB075XRXK3T%2CB00B4JZDLC%2CB00EKYR15E
%2C1119359341%2C0735623775%2CB09C6QKKS9%2C1789348013&srpt=ABIS_BOOK
If I were to point you towards two books I think would be an ideal set for learning it would be
these two:
https://www.amazon.com/gp/product/1484219724/ref=ppx_yo_dt_b_search_asin_title?
ie=UTF8&psc=1
https://www.amazon.com/gp/product/150930200X/ref=ppx_yo_dt_b_search_asin_title?
ie=UTF8&psc=1
All that being said, check your local college's IT offerings and figure out what courses they offer.
I think most offer some courses that are database specific.
All that being said, there’s a few more things to point out. This is just a starting point. It will not
help you learn the things you do overtime on the job, but I think you would understand that
anyway. In my short list of things to know (im providing that below) I do not mention database
design – I feel this is rudimentary and you need to know before you even begin. Also, people
have often asked me for “tips and tricks” (as if there’s a fucking magic button to make someone
instantly a better sql dev lol), and when this happens I tend to give them this link:
161of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
https://sqlblog.org/bad-habits
That’s Aaron Bertrand’s blog list of bad habits. While you’re learning treat this like a bible of
sorts. Start at the bottom and make your way up too by the way as somethings change over
time. Keeping all of these things in mind while you’re learning and writing code will
automatically make you better than most other people who write SQL in their day to day jobs.
There’s also few things I’m subtly hinting at with this suggesting as a Tip/Trick. Reading blogs
and being part of the community. I’ve actually been asked in interviews who blogs do I read
regularly. Consuming blogs just says you’re actually into what you do and you stay somewhat
current. Most of the big name SQL bloggers have been doing this for a long time and you can
seriously learn from them, so its worth keeping an eye on some of them. Here is a few I read
regularly: Brent Ozar, Erik Darling, Aaron Bertrand and Pinal Dave. There’s a few others but not
any I know by name.
As Promised, things a beginning SQL Developer should know when beginning the job search. I
will admit my criteria might be a little more strict than the job market so take this with a grain
of salt. FYI I have a drop box full of nifty scripts. I no longer maintain it, and it’s a bit older but I
leave it up for people I share this information with.
Training Stuff
So, the first thing to do is pick a RDMS (relational database management system) and
download/install. Most of the “getting familiar with everything” is doing a significant amount of
sandboxing while you acclimate yourself. There are other kinds of SQL technologies but
relational is kind of the most ubiquitous. I would personally lean towards Microsoft SQL Server,
but I am biased. Downloading SQL Server Xpress is free and easy.
I will outline things you need to know in order to be successful in any sql based career:
Basic -
First and foremost - know your data and your data structure.
Table Design - KEYS, INDEXES, CONSTRAINTS, VIEWS (are basically kind of tables - this will make
sense later) and TRIGGERS (need to know about but rarely use due to performance issues).
The basic Commands - SELECT, UPDATE, INSERT, DELETE. There’s more to this, but lets keep it
simple for now.
Stored Procedures and Functions - learn the difference and what you can do with them.
Logical Operators - AND, OR, IF, CASE WHEN, WHILE
JOINS - I wont go into detail here, but you need to know how to do these and what bad
practices for joins are. Learn the old school non ANSI join for information’s sake (more
162of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
academic than pragmatic, as you shouldn’t ever do them this way). Along the same topic of this
is OUTER APPLY/CROSS APPLY/INTERSECT. Also, worth knowing especially how cross apply can
be used to apply a table value function to an entire result set.
More advanced topics
In Memory tables - learn how to use table variables, temp tables (both local and global, and
understand the difference), Common Table Expressions (CTE) and Sub Queries. Knowing how to
move data around in smaller chunks is important as speed is generally the name of the game in
SQL.
Speaking of CTE’s - recursive CTE’s. Along the same lines of recursive CTE’s are Cursors. Like
triggers, you need to know about them even though you should rarely use them (can be huge
CPU hogs). Though most use cases of Recursive CTE’s were what are now known as “window
aggregate functions” there are still times you’ll need to know how to use these.
Declarative SQL- knowing you can SELECT from anything will really make coding in SQL make
sense after you’re past the basics.
Indexes - yeah this came up again LOL indexing is both an art and a science. Understand how
they work and how to construct them properly (order matters). Understand how to evaluate
whether or not you’ll need to create an index based off the table’s current indexes and
read/write states. Also knowing what costs an index has on inserts and deletes. I can go on and
on about this topic – its really important.
Query Execution Plan analysis - speaking of performance, you’ll need to know how to look at
and read these. Tells you how the compiler is “running” the sql commands. Most of the time
you'll run into KEYLOOKUPS, HASHMATCHES, NESTED LOOPS, SPOOLS. You need to know how
to troubleshoot all of these.
This should keep you busy for a while.
Also, when I was in school DE wasn’t really a widely known discipline, or if at all. That being
said, you'll need to know a whole bunch of stuff about API's, cloud based infrastructures (how
to work with and set up), different types of data sources/structures (xml, json, csv's etc etc),
data warehousing, BI and BI tools, and some other scripting language (python and javascript
seem to be the most popular).
163of164
File Path: /conversion/tmp/activity_task_scratch/899217331.docx
FileName:899217331.docx
Date Printed:Friday, June 30, 2023 8:19:00 PM
I am confused on whether to learn Python or JS. I have already started Python but keep having
second thoughts.
Where and how do you recommend I learn Data Warehousing and BI?
Honestly datawarehousing is simple. Learning how to take data marts and ETL them into a
common data structure. Most online tutorials will give you the basic idea. I dont think you need
to get too fancy with it unless the job youre working at is using you as a DE to fuel its DW(s).
Learn the common approaches, understand dimension/fact tables and best practice standards
for ETL.
I am confused on whether to learn Python or JS. I have already started Python but keep having
second thoughts.
Luckily for you, there is no wrong answer here. I personally use python but wouldnt argue
against JS if I thought it was a better tool for the specific project im working with. You'll
probably need to know both at some point anyway, so my advice is to stay flexible while youre
learning others things. A lot of your value to the workforce as a DE is about learning new things
quickly and acting on them. Youre going to be asked to do all sorts of shit - learning techy things
is super simple however the ability to critically think through your problems to solve is the real
value.
For really advanced SQL, these sites are widely considered to be excellent guides.
https://modern-sql.com/
https://use-the-index-luke.com/
2
Share
164of164