QUERY PLAN
Group (cost=2482.39..2483.95 rows=149 width=4)
Group Key: out_device
-> Sort (cost=2482.39..2483.17 rows=312 width=4)
Sort Key: out_device
-> Seq Scan on tbl_punch (cost=0.00..2469.46 rows=312 width=4)
Filter: ((out_device IS NOT NULL) AND (user_id = 1001))