statistikZH / statbotData

MIT License
0 stars 1 forks source link

Queries #52

Open sabinem opened 1 year ago

sabinem commented 1 year ago

Discuss about the queries:

Questions:

Query Nr. 1
-- Wieviele Abstimmungsvorlagen gab es im Jahr 2000?
SELECT COUNT(*) as anzahl_abstimmungsvorlagen_im_jahr_2000 FROM abstimmungsvorlagen_seit_1971 as T JOIN spatial_unit as S on T.spatialunit_uid = S.spatialunit_uid WHERE S.name_de='Schweiz' AND S.country=TRUE AND T.jahr=2000;
=======================================================
# A tibble: 1 × 1
  anzahl_abstimmungsvorlagen_im_jahr_2000
                                    <int>
1                                      12
sabinem commented 1 year ago

Answers:

nooralahzadeh commented 1 year ago

Hi @cmdoret @sabinem : Thanks for the great work. I've observed some inconsistency in the SQL queries when it comes to filtering by Canton or Municipalities names. For instance: S.name LIKE '%Aargau%' S.name="Canton of Bern" S.name_de LIKE '%Bern% Could we ensure consistency in all SQL queries? Considering the English and German dataset!

cmdoret commented 1 year ago

Thanks Farhad, we'll homogenize to with S.name LIKE '%Aargau%' AND S.canton = TRUE

cmdoret commented 1 year ago

Update from Kurt and Raphael: variety is good in this scenario, so they would rather keep it heterogenous