答案 0 :(得分:2)
看起来你知道该怎么做,所以我猜你唯一缺少的就是你需要从你的约会截断你的时间价值,所以每一天都会被认为是一个群体。您可以使用CAST AS DATE
SELECT cast([dateTime] as date) as Your_Date,ChannelID,
max(reading) as max_reading,
min(reading) as min_reading,
avg(reading) as avg_reading
FROM YourTable
GROUP BY cast([dateTime] as date) ,ChannelID