Guest User

Untitled

a guest
Feb 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. SELECT distinct on (st.gid) sv.timing, st.gid, st.area
  2. FROM servers sv
  3. INNER JOIN sites st
  4. ON (st_distance(sv.geom, st.geom)<8.5) where
  5. sv.workmode = 1 AND sv.timing >= timestamp '2018-02-02 00:00:00'
  6. and sv.timing <= timestamp '2018-02-02 23:59:59';
  7.  
  8. SELECT distinct on (st.gid) sv.timing, st.gid, st.area
  9. FROM servers sv
  10. INNER JOIN sites st
  11. ON (st_distance(sv.geom, st.geom)<8.5) where
  12. sv.workmode = 1;
Add Comment
Please, Sign In to add comment