SELECT licensePlate, SUM( CASE WHEN inOrOut = 'in' THEN 1 ELSE 0 END ) AS 'incount', SUM( CASE WHEN inOrOut = 'out' THEN 1 ELSE 0 END ) AS 'outcount' FROM license_plate_traffic_record
GROUP BY licensePlateHAVING licensePlate='赣BVM939'