STATION_ID DATE_TIME TEMP
1 2020-01-01 00:00:00 30
2 2020-01-01 00:00:00 40
1 2020-01-01 01:00:00 50
2 2020-01-01 01:00:00 50
3 2020-01-01 01:00:00 30
4 2020-01-01 01:00:00 45
select b.STATE,b.STATE,b.DISTRICT,b.STATION_NAME,a.IMEI_ID,min(a.DATA_DATE) DATADATE, a.Temp_Max, a.Temp_Avg, a.Temp_Min
from tbl_raw_aws_data_mh_last_3days_MNS_RAW a inner join STATION_V1 b on a.IMEI_ID=b.ID
where a.DATA_DATE between '2021-01-04 00:00:00' and '2021-01-04 23:50:50'
and a.source='mns' group by a.IMEI_ID
No comments:
Post a Comment