Aan de slagGa gratis aan de slag

Testing if a value is NULL

eSymphony is interested in knowing the number of tracks that are not in a playlist and cost $1.99. Since they know songs in a playlist are bought more often, they want to get an idea of the potential revenue they are missing out on.

To answer this question you will need to join the data and look at the NULL values added where the join condition is not met.

Deze oefening maakt deel uit van de cursus

Introduction to Oracle SQL

Cursus bekijken

Oefeninstructies

  • Select the total count of resulting rows.
  • Perform the appropriate join between the Track and PlaylistTrack tables.
  • Filter on tracks that are not in a playlist and cost $1.99.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

-- Count the number of rows in the result
SELECT ___(*) AS SongCount
-- Perform the appropriate join
FROM ___
	ON t.___ = p.___
-- Filter on tracks not in a playlist and cost $1.99
WHERE p.___ ___ ___ AND t.UnitPrice = ___
Code bewerken en uitvoeren