QUERY PLAN
Sort (cost=22.66..23.16 rows=200 width=12)
Sort Key: (date(dt))
-> HashAggregate (cost=12.52..15.02 rows=200 width=12)
Group Key: dt
-> Function Scan on generate_series tt (cost=0.02..10.02 rows=1000 width=8)