QUERY PLAN
Group (cost=2371.66..2374.11 rows=169 width=4)
Group Key: out_device
-> Sort (cost=2371.66..2372.88 rows=490 width=4)
Sort Key: out_device
-> Seq Scan on tbl_punch (cost=0.00..2349.76 rows=490 width=4)
Filter: ((out_device IS NOT NULL) AND (user_id = 1000))