Advertisement
jelledebock

Find intervals in sql

Oct 26th, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.21 KB | None | 0 0
  1.  
  2. --++++++++    +++++++++
  3. --+  x   +  z +   y   +
  4. --++++++++    +++++++++
  5. --         ---
  6.  
  7. y.elevation > x.elevation + 1
  8. left join z.elevation BETWEEN x.elevation+1 AND y.elevation-1
  9. WHERE z.elevation IS NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement