Order by the ratio bytes (as a decimal number) over milliseconds in decreasing order including only track_id, name, bytes, milliseconds and unit_price

Screen Link:
Ordering Results Assessment | Dataquest

My Code:
SELECT track_id, name, bytes, milliseconds, unit_price
FROM track
ORDER BY (CAST(bytes AS FLOAT)), milliseconds DESC;

Replace this line with your code

What I expected to happen:

What actually happened: @Elena_Kosourova I need help with the right answer

Replace this line with the output/error
1 Like

Hi @j.adeyemi.thomas,

You forgot to add the ratio:

SELECT track_id, name, bytes, milliseconds, unit_price
  FROM track
 ORDER BY (CAST(bytes AS FLOAT))/milliseconds DESC;
1 Like