Advertisement
bigPingRail

Untitled

May 25th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (SELECT webinars_webinar.id, private, concat_ws(', ', to_char(started_at, 'DD.MM.YYYY HH:MI'), title) as name, 'webinar' as type
  2.  FROM webinars_webinar WHERE webinars_webinar.title ILIKE '%%' and private=FALSE ORDER BY id asc )
  3. UNION DISTINCT
  4. (SELECT webinars_webinar.id, private, concat_ws(', ', to_char(started_at, 'DD.MM.YYYY HH:MI'), title) as name, 'webinar' as type
  5.  FROM webinars_webinar
  6.   JOIN webinars_webinarattendee on webinars_webinar.id = webinars_webinarattendee.webinar_id where attendee_id = 2
  7. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement