home / kmr_voting_data

Узгодженість голосування фракцій

Наскільки узгоджено голосують члени фракцій

Custom SQL query returning 9 rows (hide)

WITH faction_votes AS (SELECT PD_NPP, GLTime, Faction, DPGolos, COUNT(*) as vote_count FROM roll_call_voting_kmr GROUP BY PD_NPP, GLTime, Faction, DPGolos), faction_totals AS (SELECT PD_NPP, GLTime, Faction, SUM(vote_count) as total FROM faction_votes GROUP BY PD_NPP, GLTime, Faction), faction_max AS (SELECT fv.PD_NPP, fv.GLTime, fv.Faction, MAX(fv.vote_count) as max_votes FROM faction_votes fv GROUP BY fv.PD_NPP, fv.GLTime, fv.Faction) SELECT ft.Faction, COUNT(*) as total_votings, ROUND(AVG(100.0 * fm.max_votes / ft.total), 2) as avg_alignment_percent FROM faction_totals ft JOIN faction_max fm ON ft.PD_NPP = fm.PD_NPP AND ft.GLTime = fm.GLTime AND ft.Faction = fm.Faction GROUP BY ft.Faction ORDER BY avg_alignment_percent DESC

Edit SQL

This data as json, CSV

Factiontotal_votingsavg_alignment_percent
Мер 8550 100.0
УДАР 8550 73.19
Батьківщина 8550 71.21
Слуга народу 8550 69.4
ЄС 8550 66.47
ОПЗЖ 8550 66.11
Єдність 8550 65.64
ГОЛОС 8550 64.71
Позафракційний 8550 64.41
Powered by Datasette · Queries took 5830.871ms