| Aggregate (cost=2813.85..2813.86 rows=1 width=8) |
| -> Sort (cost=2798.85..2801.35 rows=1000 width=1688) |
| Sort Key: (date(tt.dt)) DESC |
| -> HashAggregate (cost=2736.52..2749.02 rows=1000 width=1688) |
| Group Key: tt.dt, p.day_at, p.user_id |
| -> Hash Left Join (cost=2716.27..2729.02 rows=1000 width=16) |
| Hash Cond: (date(tt.dt) = p.day_at) |
| -> Function Scan on generate_series tt (cost=0.02..10.02 rows=1000 width=8) |
| -> Hash (cost=2686.69..2686.69 rows=2365 width=8) |
| -> Seq Scan on tbl_punch p (cost=0.00..2686.69 rows=2365 width=8) |
| Filter: (user_id = 1000) |