BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
Some of our poor delegates don't have the luxury of a home computer to install SQL on (even worse some have made bad life choices and picked a Mac). The good news is that you can still practise your SQL skills in your web browser, using the impressive SQL Fiddle site. Have no fear, SQL Fiddle is here, a browser based sandbox to bring you cheer!
- Installing and configuring SQL Fiddle
- SQL Fiddle Exercise 1 - SELECT
- SQL Fiddle Exercise 2 - Order By
- SQL Fiddle Exercise 3 - Numeric Filters
- SQL Fiddle Exercise 4 - Date Filter
- SQL Fiddle Exercise 5 - Text Filters
- SQL Fiddle Exercise 6 - Cast or Convert Functions
- SQL Fiddle Exercise 7 - Conditional Function
- SQL Fiddle Exercise 8 - Counting Words
- SQL Fiddle Exercise 9 - Formatted Dates
- SQL Fiddle Exercise 10 - Date Calculations
- SQL Fiddle Exercise 11 - Inner Join
- SQL Fiddle Exercise 12 - Outer Join
- SQL Fiddle Exercise 13 - Grouping Data
- SQL Fiddle Exercise 14 - Having (this blog)
- SQL Fiddle Exercise 15 - All together now!
Posted by Sam Lowrie on 01 July 2021
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
SQL Fiddle Exercise 14 - Having
Write a query that shows for each Habitat the total number of units sold:

You'll need a GROUP BY and an INNER JOIN for this.
We don't want any low sellers, so amend your query to only include those habitats which sold more than 100 units:

Remember to use HAVING when filtering using an aggregate function.
Check your working here.
- Installing and configuring SQL Fiddle
- SQL Fiddle Exercise 1 - SELECT
- SQL Fiddle Exercise 2 - Order By
- SQL Fiddle Exercise 3 - Numeric Filters
- SQL Fiddle Exercise 4 - Date Filter
- SQL Fiddle Exercise 5 - Text Filters
- SQL Fiddle Exercise 6 - Cast or Convert Functions
- SQL Fiddle Exercise 7 - Conditional Function
- SQL Fiddle Exercise 8 - Counting Words
- SQL Fiddle Exercise 9 - Formatted Dates
- SQL Fiddle Exercise 10 - Date Calculations
- SQL Fiddle Exercise 11 - Inner Join
- SQL Fiddle Exercise 12 - Outer Join
- SQL Fiddle Exercise 13 - Grouping Data
- SQL Fiddle Exercise 14 - Having (this blog)
- SQL Fiddle Exercise 15 - All together now!