technical skills grow

Responsive Ads Here

Tuesday, January 5, 2021

Fetch single record from table in mysql

if you want to fetch record single record from table .

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

Powered by Blogger.

Labels

Contact Form

Name

Email *

Message *

Search This Blog

Blog Archive

Ad Code

Responsive Advertisement

Recent Posts