Is this a long song?
Ever feel like a song is just dragging on? In this exercise, you're going to categorize each song based on its length, which is either short, normal, or long. Good luck!
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Data Manipulation in Snowflake
คำแนะนำการฝึกหัด
- Complete the SQL query to categorize a song less than
180000milliseconds as a'Short Song'. - In the next conditional statement, add logic to label a song with a length between
180000and300000milliseconds as'Normal Length'. - If neither of these conditions are met, set the value to
'Long Song'.
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
SELECT
name,
milliseconds,
CASE
___ milliseconds < ___ THEN '___'
WHEN ___ BETWEEN ___ AND ___ ___ '___'
___ '___'
END AS song_length
FROM store.track;