QUERY PLAN
Group (cost=2705.29..2707.42 rows=190 width=4)
Group Key: in_device
-> Sort (cost=2705.29..2706.36 rows=426 width=4)
Sort Key: in_device
-> Seq Scan on tbl_punch (cost=0.00..2686.69 rows=426 width=4)
Filter: ((in_device IS NOT NULL) AND (user_id = 1001))