Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. select enc.inputdatetime::date dateMed, enc.transmissioncode,
  2. max(det.devicelevel) devicelevel, max(det.pressure) pressure,
  3. max(det.battery) battery,enc.remotelocationid,max(det.loop1con) loop1con
  4. from tl.tlinputdetail det
  5. inner join tl.tlinputtable enc on det.oldmedicionid = enc.oldmedicionid
  6. where TRIM(enc.transmissioncode)= '005'
  7. and enc.inputdatetime::date between '2015-12-12' and '2016-11-12'
  8. group by
  9. enc.transmissioncode,enc.remotelocationid,enc.inputdatetime::date
  10. order by
  11. enc.inputdatetime::date asc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement