QUERY PLAN
Group (cost=2373.09..2375.54 rows=169 width=4)
Group Key: out_device
-> Sort (cost=2373.09..2374.32 rows=490 width=4)
Sort Key: out_device
-> Seq Scan on tbl_punch (cost=0.00..2351.20 rows=490 width=4)
Filter: ((out_device IS NOT NULL) AND (user_id = 1000))