May 13, 2016

Weekday from date

select
a_timestamp, cast(cast(a_timestamp as format 'E4') as char (9)) WeekDay,  count(*)
from table
group by 1,2