QUERY PLAN
Group (cost=2711.41..2714.13 rows=173 width=4)
Group Key: out_device
-> Sort (cost=2711.41..2712.77 rows=544 width=4)
Sort Key: out_device
-> Seq Scan on tbl_punch (cost=0.00..2686.69 rows=544 width=4)
Filter: ((out_device IS NOT NULL) AND (user_id = 1000))