Guest User

Untitled

a guest
Aug 21st, 2018
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. XYZ MIA PBI some@email.com 11:15am
  2. XYZ PBI MIA some@email.com 11:15am
  3. XYZ PBI MIA some@email.com 2:15pm
  4. XYZ MIA PBI some@email.com 2:15pm
  5.  
  6. select Distinct(Count(b.RecordLocator)) as "LongHaul"
  7. , b.EmailAddress
  8. from "REZ-RideHistory" as b
  9. where b.DepartStation NOT LIKE '%L%'
  10. and b.ArriveStation NOT LIKE '%L%'
  11. group by b.Recordlocator, b.EmailAddress
  12.  
  13.  
  14. select Distinct(Count(b.RecordLocator)) as "LongHaul", b.EmailAddress
  15. from "REZ-RideHistory" as b
  16. where (b.DepartStation = "PBI" and b.ArriveStation = "MIA")
  17. or (b.DepartStation = "MIA" and b.ArriveStation = "PBI")
  18. group by b.Recordlocator, b.EmailAddress
Add Comment
Please, Sign In to add comment