0 - 3 of 3 tags for case when

Hello, I'm looking at clinic data and I'd like to group my check-in times into three main categories: 1) 7am-4pm, 2) 4:01pm-6pm, and 3) 6:01pm-11:59pm. Check-in time is formatted as follows: mm/dd/yyyy hh:mm:ss, and is 24-hour. But I reformatted it like this: hh:mi:ssbt. So now it gives me a 12-hour time with an AM/PM designation.

I want to use the CASE statement for multiple groupings, such as:

SEL

 

CASE country

WHEN 'US' THEN 'North America'

WHEN 'US' THEN 'World'

WHEN 'UK' THEN 'EU'

WHEN 'UK' THEN 'World'

...

END AS cntry_grp

, COUNT(1)

FROM countries

GROUP BY 1

 

Hi

Many thanks for any help in advance.

 I am new in teradata. Here is my case:

Test Table:  

entity_id      cust_id1        cust_id2        cust_id3          cust_id4

Table Cust:

 cust_id          fname            lname            email             phone

 

query I used: