Problem 15. Show All Games with Duration and Part of the Day %HELP%
SELECT Name AS Game,
CASE WHEN DATEPART(HOUR, Start) >= 0
AND DATEPART(HOUR, Start) < 12 THEN 'Morning'
WHEN DATEPART(HOUR, Start) >= 12
AND DATEPART(HOUR, Start) < 18 THEN 'Afternoon'
WHEN DATEPART(HOUR, Start) >= 18
AND DATEPART(HOUR, Start) < 24 THEN 'Evening'
END AS [Part of the day],
CASE WHEN Duration <= 3 THEN 'Extra Short'
WHEN Duration >= 4 AND Duration <=6 THEN 'Short'
WHEN Duration > 6 THEN 'Long'
ELSE 'Without duration'
END AS Duration
FROM Games ORDER BY Name,Duration,[Part of the day]
Я УДАРЕТЕ ЕДНО РАМО,ЧЕ JUDGE НЕ ГО ОДОБРЯВА.
https://softuni.bg/forum/13938/15-show-all-games-with-duration-from-built-in-functions-homework#answer-36689
Ей тука писахме някви неща по тази задача ;)