Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- s.id,
- s.geom,
- s.name,
- l.city as municipality,
- l.store_a,
- l.store_b,
- l.store_ab,
- l.nonestore_a,
- l.nonstore_b,
- l.nonstore_ab,
- case when store_a = true or store_b = true
- or nonestore_a = true or nonstore_b = true then 'ALLOWS'
- when store_a = true or store_b = true then 'any_store'
- when nonstore_med = true or nonestore_rec = true then 'any_nonstore'
- else 'NOT_ALLOWED'end as allowed_boolean
- FROM cities as s
- JOIN license_types as l
- on s.name = l.city
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement