Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. SELECT
  2. s.id,
  3. s.geom,
  4. s.name,
  5. l.city as municipality,
  6. l.store_a,
  7. l.store_b,
  8. l.store_ab,
  9. l.nonestore_a,
  10. l.nonstore_b,
  11. l.nonstore_ab,
  12. case when store_a = true or store_b = true
  13. or nonestore_a = true or nonstore_b = true then 'ALLOWS'
  14.  
  15. when store_a = true or store_b = true then 'any_store'
  16.  
  17. when nonstore_med = true or nonestore_rec = true then 'any_nonstore'
  18.  
  19. else 'NOT_ALLOWED'end as allowed_boolean
  20.  
  21.  
  22. FROM cities as s
  23. JOIN license_types as l
  24. on s.name = l.city
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement