筛选出ParkingStatus=0 地磁值在|200|以上 创建时间在1528689000~1528689100之间的所有分咪表
SELECT SubMeterID,SubMeterNumber,ParkingNum,ValueStatus,X,Y,Z,ParkingStatus,CreateTime
FROM urpcs_device_value
WHERE
ParkingStatus=0
AND
(ABS(X)>200 OR ABS(Y)>200 OR ABS(Z)>200)
AND
(CreateTime>1528689000 AND CreateTime<1528689100)
GROUP BY SubMeterNumber
根据SubMeterNumber筛选出满足条件的记录
SELECT SubMeterID,SubMeterNumber,ParkingNum,ValueStatus,X,Y,Z,ParkingStatus,CreateTime
FROM urpcs_device_value
WHERE
ParkingStatus=0
AND
#筛选分咪表
SubMeterNumber=00097001
#筛选地磁范围
AND
(ABS(X)>200 OR ABS(Y)>200 OR ABS(Z)>200)
AND
#筛选时间范围
(CreateTime>1528689000 AND CreateTime<1528689100)
网友评论