chekos / RIPA-2018-datasette

Publishing datasette of CA's RIPA 2018 data
http://ripa-2018.datasettes.cimarron.io/
GNU General Public License v3.0
0 stars 0 forks source link

Query suggestion #23

Closed chekos closed 4 years ago

chekos commented 4 years ago

Fixing race/ethnicity bullet

query

SELECT
  b.AGENCY_NAME as agency_name,
  rae_codes.RACE_ETHNICITY as race_ethnicity,
  COUNT(rae.RAE_FULL) as N
FROM
  race_ethnicity as rae
INNER JOIN aa_main_table as b ON b.UNIQUE_ID = rae.UNIQUE_ID
INNER JOIN race_ethnicity_codes as rae_codes ON rae.RAE_FULL = rae_codes.CODE
GROUP BY
  agency_name,
  rae.RAE_FULL