Aller au contenu
blackout

main.votes_deputes vue

Colonnes

#ColonneTypeCommentaire
1scrutin_uidVARCHAR
2legislatureBIGINT
3numeroBIGINT
4date_scrutinDATE
5acteur_uidVARCHAR
6mandat_uidVARCHAR
7groupe_uidVARCHAR
8positionVARCHAR
9par_delegationBOOLEAN
10cause_positionVARCHAR
11position_groupeVARCHAR
12contre_groupeBOOLEAN
13mise_au_pointVARCHAR

Définition

CREATE VIEW votes_deputes AS WITH votants AS ((SELECT 'pour' AS "position", _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, NULL AS cause FROM scrutins.scrutin_groupe_pours_votant) UNION ALL ((((SELECT 'pour', _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, NULL FROM scrutins.scrutin_groupe_pour_votant) UNION ALL (SELECT 'contre', _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, NULL FROM scrutins.scrutin_groupe_contres_votant)) UNION ALL ((SELECT 'contre', _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, NULL FROM scrutins.scrutin_groupe_contre_votant) UNION ALL (SELECT 'abstention', _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, NULL FROM scrutins.scrutin_groupe_abstentions_votant))) UNION ALL ((SELECT 'abstention', _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, NULL FROM scrutins.scrutin_groupe_abstention_votant) UNION ALL (SELECT 'non-votant', _racine_id, _parent_id, acteur_ref, mandat_ref, par_delegation, cause_position_vote FROM scrutins.scrutin_groupe_non_votants_votant)))), mises_au_point AS ((SELECT 'pour' AS mise_au_point, _racine_id, acteur_ref FROM scrutins.scrutin_pours_votant) UNION ALL ((((SELECT 'pour', _racine_id, acteur_ref FROM scrutins.scrutin_mise_au_point_pour_votant) UNION ALL (SELECT 'pour', _racine_id, acteur_ref FROM scrutins.scrutin_dysfonctionnement_pour_votant)) UNION ALL ((SELECT 'contre', _racine_id, acteur_ref FROM scrutins.scrutin_contres_votant) UNION ALL (SELECT 'contre', _racine_id, acteur_ref FROM scrutins.scrutin_mise_au_point_contre_votant))) UNION ALL (((SELECT 'contre', _racine_id, acteur_ref FROM scrutins.scrutin_dysfonctionnement_contre_votant) UNION ALL (SELECT 'abstention', _racine_id, acteur_ref FROM scrutins.scrutin_abstentions_votant)) UNION ALL ((SELECT 'non-votant', _racine_id, acteur_ref FROM scrutins.scrutin_non_votants_votant) UNION ALL (SELECT 'non-votant', _racine_id, acteur_ref FROM scrutins.scrutin_non_votants_volontaires_votant))))), map1 AS (SELECT _racine_id, acteur_ref, "first"(mise_au_point) AS mise_au_point FROM mises_au_point GROUP BY ALL)SELECT s.uid AS scrutin_uid, s.legislature, s.numero, s.date_scrutin, COALESCE(v.acteur_ref, m.acteur_ref) AS acteur_uid, v.mandat_ref AS mandat_uid, g.organe_ref AS groupe_uid, v."position", v.par_delegation, v.cause AS cause_position, g.vote_position_majoritaire AS position_groupe, ((v."position" IN ('pour', 'contre', 'abstention')) AND (v."position" != g.vote_position_majoritaire)) AS contre_groupe, m.mise_au_point FROM votants AS v INNER JOIN scrutins.scrutin_groupe AS g ON ((g._id = v._parent_id)) FULL JOIN map1 AS m ON (((m._racine_id = v._racine_id) AND (m.acteur_ref = v.acteur_ref))) INNER JOIN scrutins.scrutin AS s ON ((s._id = COALESCE(v._racine_id, m._racine_id)));

Aperçu

scrutin_uidlegislaturenumerodate_scrutinacteur_uidmandat_uidgroupe_uidpositionpar_delegationcause_positionposition_groupecontre_groupemise_au_point
VTANR5L15V11691511692018-09-25PA1327PM722762PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA1874PM722598PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA267289PM754301PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA267378PM723344PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA267440PM722522PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA2792PM722870PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA2960PM723006PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA718850PM722478PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA608826PM723276PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA334149PM723034PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA332523PM722792PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA342935PM722856PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721968PM723436PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA605991PM722660PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721410PM723266PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA607090PM722796PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA608016PM723024PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA608416PM723540PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA609245PM723318PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA718784PM722456PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA719272PM722612PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA719318PM722624PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA643134PM722824PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA720386PM722948PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA642847PM722954PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA720630PM723020PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721054PM723156PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721286PM723224PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721314PM723236PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721506PM723296PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA346218PM723348PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA722390PM723560PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA330909PM722548PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA266793PM722550PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA709315PM722526PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA712015PM722448PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA643089PM758076PO730934pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA333818PM722990PO758835pourFalseabstentionTrue
VTANR5L15V11691511692018-09-25PA719608PM722710PO723569pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA720422PM722960PO730958pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721210PM723204PO730958pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA722142PM723484PO730958pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA722202PM723502PO730940pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA267306PM723054PO730940pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA718926PM722502PO730940pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA718720PM722436PO730940pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA720546PM722996PO730940pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA721270PM723220PO730940pourFalsepourFalse
VTANR5L15V11691511692018-09-25PA335612PM723506PO730940pourFalsepourFalse
VTANR5L15V117151172017-08-03PA721262PM723218PO730964pourFalsepourFalse