I am submitting the following code which is not being accepted as the correct answer.
WITH sum_data AS ( SELECT p.playlist_id, p.name playlist_name, t.name track_name, (t.milliseconds * 0.001) length_seconds FROM playlist p LEFT JOIN playlist_track pt ON pt.playlist_id=p.playlist_id LEFT JOIN track t ON t.track_id=pt.track_id ) SELECT playlist_id, playlist_name, COUNT(track_name) number_of_tracks, SUM(length_seconds) length_seconds FROM sum_data GROUP BY playlist_id, playlist_name ORDER BY playlist_id ASC;
I expect it to be accepted as correct as the only difference I can see is the number of decimals in “length_seconds” column where I use multiplication operation vs devision (as in the course supplier correct answer).
(t.milliseconds * 0.001) length_seconds
and the course suggested code is:
(t.milliseconds / 1000.0) length_seconds
This is the error message I am getting when submitting the answer:
The value for result doesn't look right. One of your variables doesn't seem to have the correct value. Please re-check the instructions and your code.
E.g. for the fist row in the generated table my code produces this length in seconds: 877683.0829999989
and the course supplied code this: 877683.0829999988
Please advise what do I miss?