daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Feb 12th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Row # | start - end
  2. Row 1 | 1:00 - 4:00
  3. Row 2 | 3:00 - 6:00
  4.    
  5. SELECT length( (start, end) )  WHERE (start, end) INTERSECTS (2:00,4:00)
  6.    
  7. INTERVAL 3 HOURS
  8.    
  9. SELECT "lower bound of start", length( (start, end) )  GROUP BY INTERVAL 1 HOUR
  10.    
  11. 1:00 | 1
  12. 2:00 | 1
  13. 3:00 | 2
  14. 4:00 | 2
  15. 5:00 | 1
  16.    
  17. heroku addons:add heroku-postgresql:dev --version=9.2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top