QUERY PLAN
Group (cost=341.28..341.58 rows=61 width=4)
Group Key: u.id
-> Sort (cost=341.28..341.43 rows=61 width=4)
Sort Key: u.id
-> Hash Left Join (cost=9.53..339.47 rows=61 width=4)
Hash Cond: (p.user_id = u.id)
-> Index Scan using tbl_punch_pkey on tbl_punch p (cost=0.29..330.07 rows=61 width=4)
Index Cond: ((day_at >= '2026-06-01'::date) AND (day_at <= '2026-06-30'::date))
Filter: ((in_at IS NOT NULL) OR (out_at IS NOT NULL))
-> Hash (cost=7.44..7.44 rows=144 width=4)
-> Seq Scan on tbl_users u (cost=0.00..7.44 rows=144 width=4)