Can someone please explain why it's not running? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone please explain why it's not running?

/* select the song title and artist from the songs table where the song title contains the word 'love' and order the results by the rating in descending order */ SELECT artist, title FROM songs WHERE LOWER(title) LIKE '%love%' ORDER BY rating DESC Solved! The right answer is SELECT title, artist FROM songs WHERE LOWER(title) LIKE '%love%' ORDER BY rating DESC

26th Oct 2023, 7:08 PM
Vanity
Vanity - avatar
2 Answers
+ 3
Are the fields out of order? The problem statement says title, artist; and the query has artist, title.
27th Oct 2023, 6:29 AM
Brian
Brian - avatar
+ 2
Is it from the Introduction to SQL > Query Techniques > Music and Love! ? I don't have a pro access but your SQL seems fine to me. If the test case(s) is not locked, you can compare your result and the expected output and find the difference.
27th Oct 2023, 1:54 AM
Wong Hei Ming
Wong Hei Ming - avatar