Skip to content

Commit

Permalink
feat(cdc): add enriched model to get PS titles related to user partic…
Browse files Browse the repository at this point in the history
…ipations
  • Loading branch information
hellpe committed Aug 30, 2024
1 parent dfddbff commit b6edc19
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 b6edc19

Please sign in to comment.