我写了一个查询
(SELECT TimeStamp, AVG(FwdHr), W
FROM Meter_Data
WHERE (TimeStamp Between 1370476500 AND 1370477100 AND DeviceID = '1'
GROUP BY MeterID ORDER BY TimeStamp)
UNION
(SELECT TimeStamp, AVG(FwdHr), W
FROM Meter_Data
WHERE TimeStamp Between 1370496006 AND 1370496606 AND DeviceID = '1'
GROUP BY MeterID ORDER BY TimeStamp)
我想从表中为两个时间戳之间的每个仪表 ID 选择 avg(FwdHr)
然后将其与具有不同时间间隔的相同查询联合