Skip to content

Commit

Permalink
Merge pull request #5 from OpenSourcePolitics/add_extended_data_to_pa…
Browse files Browse the repository at this point in the history
…rticipations

feat(cdc): add enriched model to get PS titles related to user partic…
  • Loading branch information
JeanLouisLamezec authored Aug 30, 2024
2 parents 1941fe5 + b6edc19 commit e742103
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SELECT
DISTINCT ON (user_id, ps_title)
user_id,
users.age_category AS age_category,
decidim_component_id,
components.ps_title AS ps_title
FROM {{ ref("participations")}} participations
JOIN {{ ref("components")}} components ON participations.decidim_component_id = components.id
JOIN {{ ref("users")}} users ON participations.user_id = users.id

0 comments on commit e742103

Please sign in to comment.