The following is the first part of the code and as a result, is right,
The SELECT a.S ERIALNUMBER, b.M ETERREAD, arjun
The FROM (SELECT s1 SERIALNUMBER, MAX (integrated. METERREADDATE) as m
The from wk001. Serf01 s1
Left the join wk001. Serf09 integrated
On the integrated. The SERIALNUMBER=s1. The SERIALNUMBER
Where s1. BILLTOCUSTOMERCODE='02366'
And s1. S01_DEL_FLAG & lt;>
'Y'Group by SERIALNUMBER
The order by METERREADDATE desc
) as a
Left the join wk001. Serf09 as b
On a.S ERIALNUMBER=b.S ERIALNUMBER
And arjun=b.M ETERREADDATE
The order by arjun desc
