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 licensePlate
HAVING licensePlate='赣BVM939'
songqiaoli
一切有为法,如梦幻泡影,如雾亦如电,应作如是观
|
|
|
|