{"ok": true, "database": "schools", "query_name": "district_race_ethnicity_by_year_for_state_and_grade", "rows": [["asian_int", null, null, null, null, null, null, null, null, null], ["asian_pacific_islander_int", null, null, null, null, null, null, null, null, null], ["black_int", null, null, null, null, null, null, null, null, null], ["hispanic_int", null, null, null, null, null, null, null, null, null], ["multiracial_int", null, null, null, null, null, null, null, null, null], ["native_american_alaskan_native_int", null, null, null, null, null, null, null, null, null], ["native_american_int", null, null, null, null, null, null, null, null, null], ["native_hawaiian_int", null, null, null, null, null, null, null, null, null], ["native_hawaiian_pacific_islander_int", null, null, null, null, null, null, null, null, null], ["pacific_islander_int", null, null, null, null, null, null, null, null, null], ["unknown_race_int", null, null, null, null, null, null, null, null, null], ["white_int", null, null, null, null, null, null, null, null, null]], "truncated": false, "columns": ["column", "total_2015", "total_2016", "total_2017", "total_2018", "total_2019", "total_2020", "total_2021", "change_2020_2021", "percent_change"], "query": {"sql": "with combined as (\nselect\n 'asian_int' as column,\n sum(asian_int) filter (where year = 2015) as total_2015,\n sum(asian_int) filter (where year = 2016) as total_2016,\n sum(asian_int) filter (where year = 2017) as total_2017,\n sum(asian_int) filter (where year = 2018) as total_2018,\n sum(asian_int) filter (where year = 2019) as total_2019,\n sum(asian_int) filter (where year = 2020) as total_2020,\n sum(asian_int) filter (where year = 2021) as total_2021,\n (\n sum(asian_int) filter (where year = 2021)) - (sum(asian_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(asian_int) filter (where year = 2021)) - (sum(asian_int) filter (where year = 2020))) /\n sum(asian_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'asian_pacific_islander_int' as column,\n sum(asian_pacific_islander_int) filter (where year = 2015) as total_2015,\n sum(asian_pacific_islander_int) filter (where year = 2016) as total_2016,\n sum(asian_pacific_islander_int) filter (where year = 2017) as total_2017,\n sum(asian_pacific_islander_int) filter (where year = 2018) as total_2018,\n sum(asian_pacific_islander_int) filter (where year = 2019) as total_2019,\n sum(asian_pacific_islander_int) filter (where year = 2020) as total_2020,\n sum(asian_pacific_islander_int) filter (where year = 2021) as total_2021,\n (\n sum(asian_pacific_islander_int) filter (where year = 2021)) - (sum(asian_pacific_islander_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(asian_pacific_islander_int) filter (where year = 2021)) - (sum(asian_pacific_islander_int) filter (where year = 2020))) /\n sum(asian_pacific_islander_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'black_int' as column,\n sum(black_int) filter (where year = 2015) as total_2015,\n sum(black_int) filter (where year = 2016) as total_2016,\n sum(black_int) filter (where year = 2017) as total_2017,\n sum(black_int) filter (where year = 2018) as total_2018,\n sum(black_int) filter (where year = 2019) as total_2019,\n sum(black_int) filter (where year = 2020) as total_2020,\n sum(black_int) filter (where year = 2021) as total_2021,\n (\n sum(black_int) filter (where year = 2021)) - (sum(black_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(black_int) filter (where year = 2021)) - (sum(black_int) filter (where year = 2020))) /\n sum(black_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'hispanic_int' as column,\n sum(hispanic_int) filter (where year = 2015) as total_2015,\n sum(hispanic_int) filter (where year = 2016) as total_2016,\n sum(hispanic_int) filter (where year = 2017) as total_2017,\n sum(hispanic_int) filter (where year = 2018) as total_2018,\n sum(hispanic_int) filter (where year = 2019) as total_2019,\n sum(hispanic_int) filter (where year = 2020) as total_2020,\n sum(hispanic_int) filter (where year = 2021) as total_2021,\n (\n sum(hispanic_int) filter (where year = 2021)) - (sum(hispanic_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(hispanic_int) filter (where year = 2021)) - (sum(hispanic_int) filter (where year = 2020))) /\n sum(hispanic_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'multiracial_int' as column,\n sum(multiracial_int) filter (where year = 2015) as total_2015,\n sum(multiracial_int) filter (where year = 2016) as total_2016,\n sum(multiracial_int) filter (where year = 2017) as total_2017,\n sum(multiracial_int) filter (where year = 2018) as total_2018,\n sum(multiracial_int) filter (where year = 2019) as total_2019,\n sum(multiracial_int) filter (where year = 2020) as total_2020,\n sum(multiracial_int) filter (where year = 2021) as total_2021,\n (\n sum(multiracial_int) filter (where year = 2021)) - (sum(multiracial_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(multiracial_int) filter (where year = 2021)) - (sum(multiracial_int) filter (where year = 2020))) /\n sum(multiracial_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'native_american_alaskan_native_int' as column,\n sum(native_american_alaskan_native_int) filter (where year = 2015) as total_2015,\n sum(native_american_alaskan_native_int) filter (where year = 2016) as total_2016,\n sum(native_american_alaskan_native_int) filter (where year = 2017) as total_2017,\n sum(native_american_alaskan_native_int) filter (where year = 2018) as total_2018,\n sum(native_american_alaskan_native_int) filter (where year = 2019) as total_2019,\n sum(native_american_alaskan_native_int) filter (where year = 2020) as total_2020,\n sum(native_american_alaskan_native_int) filter (where year = 2021) as total_2021,\n (\n sum(native_american_alaskan_native_int) filter (where year = 2021)) - (sum(native_american_alaskan_native_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(native_american_alaskan_native_int) filter (where year = 2021)) - (sum(native_american_alaskan_native_int) filter (where year = 2020))) /\n sum(native_american_alaskan_native_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'native_american_int' as column,\n sum(native_american_int) filter (where year = 2015) as total_2015,\n sum(native_american_int) filter (where year = 2016) as total_2016,\n sum(native_american_int) filter (where year = 2017) as total_2017,\n sum(native_american_int) filter (where year = 2018) as total_2018,\n sum(native_american_int) filter (where year = 2019) as total_2019,\n sum(native_american_int) filter (where year = 2020) as total_2020,\n sum(native_american_int) filter (where year = 2021) as total_2021,\n (\n sum(native_american_int) filter (where year = 2021)) - (sum(native_american_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(native_american_int) filter (where year = 2021)) - (sum(native_american_int) filter (where year = 2020))) /\n sum(native_american_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'native_hawaiian_int' as column,\n sum(native_hawaiian_int) filter (where year = 2015) as total_2015,\n sum(native_hawaiian_int) filter (where year = 2016) as total_2016,\n sum(native_hawaiian_int) filter (where year = 2017) as total_2017,\n sum(native_hawaiian_int) filter (where year = 2018) as total_2018,\n sum(native_hawaiian_int) filter (where year = 2019) as total_2019,\n sum(native_hawaiian_int) filter (where year = 2020) as total_2020,\n sum(native_hawaiian_int) filter (where year = 2021) as total_2021,\n (\n sum(native_hawaiian_int) filter (where year = 2021)) - (sum(native_hawaiian_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(native_hawaiian_int) filter (where year = 2021)) - (sum(native_hawaiian_int) filter (where year = 2020))) /\n sum(native_hawaiian_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'native_hawaiian_pacific_islander_int' as column,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2015) as total_2015,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2016) as total_2016,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2017) as total_2017,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2018) as total_2018,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2019) as total_2019,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2020) as total_2020,\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2021) as total_2021,\n (\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2021)) - (sum(native_hawaiian_pacific_islander_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2021)) - (sum(native_hawaiian_pacific_islander_int) filter (where year = 2020))) /\n sum(native_hawaiian_pacific_islander_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'pacific_islander_int' as column,\n sum(pacific_islander_int) filter (where year = 2015) as total_2015,\n sum(pacific_islander_int) filter (where year = 2016) as total_2016,\n sum(pacific_islander_int) filter (where year = 2017) as total_2017,\n sum(pacific_islander_int) filter (where year = 2018) as total_2018,\n sum(pacific_islander_int) filter (where year = 2019) as total_2019,\n sum(pacific_islander_int) filter (where year = 2020) as total_2020,\n sum(pacific_islander_int) filter (where year = 2021) as total_2021,\n (\n sum(pacific_islander_int) filter (where year = 2021)) - (sum(pacific_islander_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(pacific_islander_int) filter (where year = 2021)) - (sum(pacific_islander_int) filter (where year = 2020))) /\n sum(pacific_islander_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'unknown_race_int' as column,\n sum(unknown_race_int) filter (where year = 2015) as total_2015,\n sum(unknown_race_int) filter (where year = 2016) as total_2016,\n sum(unknown_race_int) filter (where year = 2017) as total_2017,\n sum(unknown_race_int) filter (where year = 2018) as total_2018,\n sum(unknown_race_int) filter (where year = 2019) as total_2019,\n sum(unknown_race_int) filter (where year = 2020) as total_2020,\n sum(unknown_race_int) filter (where year = 2021) as total_2021,\n (\n sum(unknown_race_int) filter (where year = 2021)) - (sum(unknown_race_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(unknown_race_int) filter (where year = 2021)) - (sum(unknown_race_int) filter (where year = 2020))) /\n sum(unknown_race_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term\nunion\nselect\n 'white_int' as column,\n sum(white_int) filter (where year = 2015) as total_2015,\n sum(white_int) filter (where year = 2016) as total_2016,\n sum(white_int) filter (where year = 2017) as total_2017,\n sum(white_int) filter (where year = 2018) as total_2018,\n sum(white_int) filter (where year = 2019) as total_2019,\n sum(white_int) filter (where year = 2020) as total_2020,\n sum(white_int) filter (where year = 2021) as total_2021,\n (\n sum(white_int) filter (where year = 2021)) - (sum(white_int) filter (where year = 2020)\n ) as change_2020_2021,\n round(\n (1.0 * (\n sum(white_int) filter (where year = 2021)) - (sum(white_int) filter (where year = 2020))) /\n sum(white_int) filter (where year = 2020) * 100,\n 2) as percent_change\nfrom districts\nwhere state = :state\nand grade = :grade\nand term = :term) select * from combined order by percent_change\n", "params": {"state": "", "grade": "", "term": ""}}, "error": null, "private": false, "allow_execute_sql": true, "query_ms": 2.7229010011069477, "source": "Big Local News", "source_url": "https://biglocalnews.org/"}