SHARE
TWEET

15. Show All Games with Duration

a guest Feb 14th, 2017 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select [Name]
  2.       ,CASE
  3.         WHEN DATEPART(hour,Start) between 0 and 11
  4.             THEN 'Morning'
  5.         WHEN DATEPART(hour,Start) between 12 and 17
  6.             THEN 'Afternoon'
  7.         WHEN DATEPART(hour,Start) between 18 and 23
  8.             THEN 'Evening'
  9.        END as [Part of the Day]
  10.       ,CASE
  11.         WHEN [Duration] <= 3
  12.             THEN 'Extra Short'
  13.         WHEN [Duration] between 4 and 6
  14.             THEN 'Short'
  15.         WHEN [Duration] > 6
  16.             THEN 'Long'
  17.         WHEN [Duration] is null
  18.             THEN 'Extra Long'
  19.       END as [Duration]
  20.      from Games
  21.      order by [Name]
  22.              ,[Duration]
  23.              ,[Part of the Day]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top