| Sort (cost=4637.99..4640.49 rows=1000 width=436) |
| Sort Key: (date(tt.dt)) DESC |
| -> Group (cost=4570.66..4588.16 rows=1000 width=436) |
| Group Key: tt.dt, p.day_at, p.user_id |
| -> Sort (cost=4570.66..4573.16 rows=1000 width=420) |
| Sort Key: tt.dt, p.day_at, p.user_id |
| -> Hash Left Join (cost=4508.08..4520.83 rows=1000 width=420) |
| 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=4477.21..4477.21 rows=2468 width=412) |
| -> Seq Scan on tbl_punch p (cost=0.00..4477.21 rows=2468 width=412) |
| Filter: (user_id = 1000) |