Profile PictureDaniel
$4.99+

SQL Practice Problems

3 ratings
Add to cart

SQL Practice Problems

$4.99+
3 ratings

Do you want to learn SQL or practice your SQL skills?

There are few more important skills than SQL today as a developer, programmer, or engineer. But, it can be hard to learn SQL skills without some real-world problems to solve!

This is a Docker and docker-compose based code-base that uses Postgres (within Docker) set of 35 SQL questions.

There are three categories

  • Basic
  • Intermediate
  • Advanced

Each has its own set of questions. There are templates where your SQL answer to the question goes and prebuilt unit tests that can be run that will test if your SQL is correct or bad!! (there is already preconfigured data ... all you have to do is write SQL to answer the questions)

An example question is ...

#### Problem 35: Window Function - LEAD() and LAG()
Objective: Utilize `LEAD()` and `LAG()` window functions.
Table: stock_prices (columns: `stock_id`, `date`, `closing_price`)
Task: Write a SQL query to compare each day's closing price with the previous and next day’s prices for each stock.
Return `stock_id`, `date`, `previous_day_price`, `next_day_price`
Order by `stock_id` and `date`

As long as you can build a docker image and run a docker-compose command, you will be off to the races practicing your SQL skills.

Using this code base is very easy! You can practice your Docker skills and SQL!

First, `cd` into the directory you first want to work on.
```
- beginner-problems
- intermediate-problems
- advanced-problems
```
Then you must build the `Docker` image in the directory you're working on.
```
docker build . --tag=beginner
docker build . --tag=intermediate
docker build . --tag=advanced
```

Next read the questions.
Place your SQL to the questions in the `tests/sqlhereyouhobbit.sql` files ... Each problem is labeled.

To check if your SQL is correct, run the unit tests against them by running ...
`docker-compose up beginner` or `docker-compose up intermediate` etc.
Each problems unit test will either pass or fail.


$
Add to cart

SQL Practice Problems with pre-built unit tests!

Size
38.8 KB
Copy product URL

Ratings

4.3
(3 ratings)
5 stars
67%
4 stars
0%
3 stars
33%
2 stars
0%
1 star
0%