Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
Comparisons with NULL
Functions with NULL
COALESCE to the rescue
21. NULLIF – practice 1
Revision and practice


Good. Let's do another exercise to practice the use of NULLIF.


Show the name of each product and the column ratio calculated in the following way: the price of each product in relation to its shipping_cost in percent (e.g. 31.21), rounded to an integer value.

If the shipping_cost is 0.00, show NULL instead.

Stuck? Here's a hint!

Use the function round(x) to get the rounded value. There is no need to append the percent sign.