Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Determine Average Count by Day of Week - response (1) by dnoeth

$
0
0
What do you mean by "6 thursdays in the date range", the number of thursdays in the calendar or the number of thursdays with data in your table? #2 is easy using nested aggregates: SELECT AREA_NM_TURF, CMTMT_DT (format 'eee') (char(3)) as DayofWeek, avg(cnt) as CountbyDayofWeek from ( SELECT AREA_NM_TURF, CMTMT_DT, Count (*) as cnt FROM ... group by 1,2 ) as dt group by 1,2 Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>