Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select enc.inputdatetime::date dateMed, enc.transmissioncode,
- max(det.devicelevel) devicelevel, max(det.pressure) pressure,
- max(det.battery) battery,enc.remotelocationid,max(det.loop1con) loop1con
- from tl.tlinputdetail det
- inner join tl.tlinputtable enc on det.oldmedicionid = enc.oldmedicionid
- where TRIM(enc.transmissioncode)= '005'
- and enc.inputdatetime::date between '2015-12-12' and '2016-11-12'
- group by
- enc.transmissioncode,enc.remotelocationid,enc.inputdatetime::date
- order by
- enc.inputdatetime::date asc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement