NYCPlanning / db-developments

🏠 🏘️ 🏗️ Developments Database
https://nycplanning.github.io/db-developments
8 stars 2 forks source link

20Q2 - QAQC - output jobs where occ_init or occ_prop suggests non-residential, but units_init/prop <> 0 #26

Closed AmandaDoyle closed 4 years ago

AmandaDoyle commented 4 years ago

In QAQC sit output all records where ~occ_category = Other and units_init/prop <> 0~

WHERE 
(NOT 
    (occ_init ~* 'RESIDENTIAL' 
     OR occ_prop ~* 'RESIDENTIAL'
     OR upper(occ_init) LIKE '%ASSISTED%LIVING%' 
     OR upper(occ_prop) LIKE '%ASSISTED%LIVING%')
AND (units_init > 0 OR units_prop > 0))
kschmidtDCP commented 4 years ago

This is still important, so that we can see the full list of jobs that have units but don't specify a resisential occupancy and potentially research them if needed. Knowing what we know about the resid_flag, the new logic is provided below, and also listed in the QAQC document in #33:

Output TRUE if either is true: