Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
401 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
You are welcome to try any of the 35 Postgres SQL exercises listed below, but please do not distribute them in any form without asking for our written permission first.
| Software: | Postgres SQL |
| Topic: | Using Postgres SQL |
| Level: | Average difficulty |
| Exercise: | Follow this exercise to install the Wise Owl music database in Postgres. |
| Software: | Postgres SQL |
| Topic: | Simple Queries |
| Level: | Relatively easy |
| Exercise: | Create a query to list out artists with column aliases and ordering. |
| Software: | Postgres SQL |
| Topic: | Simple Queries |
| Level: | Average difficulty |
| Exercise: | Queries to show a list of the top-selling, longest and shortest albums. |
| Software: | Postgres SQL |
| Topic: | Simple Queries |
| Level: | Harder than average |
| Exercise: | Create a variety of SQL queries listing the top event venues by a range of different criteria. |
| Software: | Postgres SQL |
| Topic: | Setting criteria using WHERE |
| Level: | Relatively easy |
| Exercise: | Display various list of albums depending on the text in the album name. |
| Software: | Postgres SQL |
| Topic: | Setting criteria using WHERE |
| Level: | Relatively easy |
| Exercise: | Use date-based crieria in a query to show different combinations of tracks. |
| Software: | Postgres SQL |
| Topic: | Setting criteria using WHERE |
| Level: | Relatively easy |
| Exercise: | Use the WHERE clause in a SQL query to return lists of different high-selling albums. |
| Software: | Postgres SQL |
| Topic: | Setting criteria using WHERE |
| Level: | Average difficulty |
| Exercise: | Listing out successful albums using the WHERE clause to combine criteria. |
| Software: | Postgres SQL |
| Topic: | Setting criteria using WHERE |
| Level: | Average difficulty |
| Exercise: | Use the LIKE operator and wildcard characters in the WHERE clause of a SQL query to return a list of live music venues. |
| Software: | Postgres SQL |
| Topic: | Setting criteria using WHERE |
| Level: | Average difficulty |
| Exercise: | Various queries listing albums combining null with other criteria. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Relatively easy |
| Exercise: | Add and sort by a column to show unsold tickets for shows. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Relatively easy |
| Exercise: | Casting and converting to show the correct average ticket price for each tour. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Relatively easy |
| Exercise: | Create calculated columns joining names and minutes/seconds together. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Relatively easy |
| Exercise: | Use the CASE expression to calculate the correct certifications for albums based on sales. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Relatively easy |
| Exercise: | Use the COALESCE function to get meaningful names where they are null. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Average difficulty |
| Exercise: | Use CASE expressions to categorise venues by capacity, era and stattus. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Average difficulty |
| Exercise: | Use trimming and replacing to clear up messy names for album tracks. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Average difficulty |
| Exercise: | Work out the average length of songs in a list of albums using calculations and casting. |
| Software: | Postgres SQL |
| Topic: | Calculations |
| Level: | Harder than average |
| Exercise: | Extract information from addresses and list of venue names using text functions. |
| Software: | Postgres SQL |
| Topic: | Calculations using dates |
| Level: | Relatively easy |
| Exercise: | Use the to_char function to format the release dates of albums to look right. |
| Software: | Postgres SQL |
| Topic: | Calculations using dates |
| Level: | Average difficulty |
| Exercise: | Use date functions to calculate the length of concert tours ad show gross revenue per day. |
| Software: | Postgres SQL |
| Topic: | Calculations using dates |
| Level: | Harder than average |
| Exercise: | Use date functions to calculate the lifespan of venues and demolition statistics. |
| Software: | Postgres SQL |
| Topic: | Basic joins |
| Level: | Average difficulty |
| Exercise: | Use joins to link music albums to their genres and then apply criteria to the resulting list of rows. |
| Software: | Postgres SQL |
| Topic: | Basic joins |
| Level: | Harder than average |
| Exercise: | Link concert venues to various other tables to practise creating inner joins. |
| Software: | Postgres SQL |
| Topic: | More exotic joins |
| Level: | Relatively easy |
| Exercise: | Use outer joins to show all tours (even those with no assocated albums). |
| Software: | Postgres SQL |
| Topic: | More exotic joins |
| Level: | Average difficulty |
| Exercise: | Show a list of music artists who don't have any associated concert tours. |
| Software: | Postgres SQL |
| Topic: | Aggregation and grouping |
| Level: | Relatively easy |
| Exercise: | Calculate and show various aggregated values for a list of music artists using GROUP BY. |
| Software: | Postgres SQL |
| Topic: | Aggregation and grouping |
| Level: | Relatively easy |
| Exercise: | Show a variety of aggregated statistics for artists using GROUP BY and HAVING. |
| Software: | Postgres SQL |
| Topic: | Aggregation and grouping |
| Level: | Average difficulty |
| Exercise: | Group concerts by multiple different geographic columns and show basic aggregated statistics. |
| Software: | Postgres SQL |
| Topic: | Views |
| Level: | Average difficulty |
| Exercise: | Create a view to show a list of number 1 albums and fields from other tables. |
| Software: | Postgres SQL |
| Topic: | Subqueries |
| Level: | Relatively easy |
| Exercise: | Show venues with capacity bigger or smaller than average using subqueries. |
| Software: | Postgres SQL |
| Topic: | Subqueries |
| Level: | Average difficulty |
| Exercise: | Use subqueries to show a list of longer than average music albums and other interesting information!. |
| Software: | Postgres SQL |
| Topic: | Derived tables and CTEs |
| Level: | Relatively easy |
| Exercise: | Use a CTE to categorise music albums according to sales certifications. |
| Software: | Postgres SQL |
| Topic: | Derived tables and CTEs |
| Level: | Average difficulty |
| Exercise: | Use a CTE to aggregate information about tracks on albums without multiple GROUP BY columns. |
| Software: | Postgres SQL |
| Topic: | Derived tables and CTEs |
| Level: | Harder than average |
| Exercise: | Use multiple CTEs query to return details of venues and statistics of shows held at them. |
You can search our full list of PostgreSQL exercises here. Or why not learn to do them the right way on one of our PostgreSQL training courses? You can attend our online training classes wherever you are in the world!
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2026. All Rights Reserved.