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 #21

Open chekos opened 4 years ago

chekos commented 4 years ago

Fixing Race/Ethnicity Numbers by Agency Name

query

SELECT
  b.AGENCY_NAME as agency_name,
  rae.RAE_FULL 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
GROUP BY
  agency_name,
  rae.RAE_FULL