QUERY PLAN
Group (cost=476.68..477.11 rows=87 width=4)
Group Key: u.id
-> Sort (cost=476.68..476.90 rows=87 width=4)
Sort Key: u.id
-> Hash Left Join (cost=15.00..473.88 rows=87 width=4)
Hash Cond: (p.user_id = u.id)
-> Bitmap Heap Scan on tbl_punch p (cost=5.83..464.46 rows=87 width=4)
Recheck Cond: ((day_at >= '2025-09-01'::date) AND (day_at <= '2025-09-19'::date))
Filter: ((in_at IS NOT NULL) OR (out_at IS NOT NULL))
-> Bitmap Index Scan on tbl_punch_pkey (cost=0.00..5.81 rows=152 width=0)
Index Cond: ((day_at >= '2025-09-01'::date) AND (day_at <= '2025-09-19'::date))
-> Hash (cost=7.41..7.41 rows=141 width=4)
-> Seq Scan on tbl_users u (cost=0.00..7.41 rows=141 width=4)