Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT *
- FROM campaign c
- INNER JOIN campaign_relation cr on c.id = cr.campaign_id
- INNER JOIN user_account ua on cr.user_account_id = ua.id
- INNER JOIN user_profile up on ua.id = up.user_account_id where cr.user_role='owner'
- and to_tsvector('english', coalesce(c.description, '') || ' ' || coalesce(c.name, '') || ' ' || coalesce(up.first_name, '') || ' ' || coalesce(up.last_name, ''))
- @@ to_tsquery('english', '%s');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement