29 lines
1.1 KiB
MySQL
29 lines
1.1 KiB
MySQL
|
SELECT d.title,
|
||
|
SUM(UJAHR=2022) as Jahr_2022,
|
||
|
SUM(UJAHR=2021) as Jahr_2021,
|
||
|
SUM(UJAHR=2020) as Jahr_2020,
|
||
|
SUM(UJAHR=2019) as Jahr_2019,
|
||
|
|
||
|
SUM(UJAHR=2022 AND UKATEGORIE=1) as Tode_2022,
|
||
|
SUM(UJAHR=2021 AND UKATEGORIE=1) as Tode_2021,
|
||
|
SUM(UJAHR=2020 AND UKATEGORIE=1) as Tode_2020,
|
||
|
SUM(UJAHR=2019 AND UKATEGORIE=1) as Tode_2019,
|
||
|
|
||
|
SUM(UJAHR=2022 AND UKATEGORIE=2) as Schwerverletzt_2022,
|
||
|
SUM(UJAHR=2021 AND UKATEGORIE=2) as Schwerverletzt_2021,
|
||
|
SUM(UJAHR=2020 AND UKATEGORIE=2) as Schwerverletzt_2020,
|
||
|
SUM(UJAHR=2019 AND UKATEGORIE=2) as Schwerverletzt_2019,
|
||
|
|
||
|
SUM(UJAHR=2022 AND UKATEGORIE=3) as Leichtverletzt_2022,
|
||
|
SUM(UJAHR=2021 AND UKATEGORIE=3) as Leichtverletzt_2021,
|
||
|
SUM(UJAHR=2020 AND UKATEGORIE=3) as Leichtverletzt_2020,
|
||
|
SUM(UJAHR=2019 AND UKATEGORIE=3) as Leichtverletzt_2019,
|
||
|
|
||
|
d.Population as Population,
|
||
|
SUM(UJAHR=2022)/d.Population*1000 as Quote_2022
|
||
|
|
||
|
FROM data s, district d
|
||
|
WHERE IstRad=1
|
||
|
AND d.ULAND=s.ULAND and d.UREGBEZ=s.UREGBEZ and d.UKREIS=s.UKREIS
|
||
|
GROUP BY s.ULAND, s.UREGBEZ, s.UKREIS
|
||
|
ORDER BY Quote_2022 DESC;
|