I'm having trouble with this query ```SELECT s...
# help
p
I'm having trouble with this query
Copy code
SELECT
    sja.segment,
    sjct.constraint_type,
    sjac.constraint_value,
    relation,
    sja.segment,
    sjct.constraint_type,
    sjac.constraint_value
FROM signal_journey_audience_constraint_relations
JOIN signal_journey_audiences sja ON signal_journey_audience_constraint_relations.audience_id = sja.audience_id
JOIN signal_journey_audience_constraints sjac ON signal_journey_audience_constraint_relations.constraint_id = sjac.constraint_id
JOIN signal_journey_constraint_type sjct ON sjac.constraint_type_id = sjct.constraint_type_id
s
You can wrap that query in a function and call it through rpc: https://supabase.com/docs/reference/javascript/rpc
p
Thanks Steve ill take a look at that