Skip to content

Instantly share code, notes, and snippets.

@tkusano
Created May 20, 2018 18:20
Show Gist options
  • Save tkusano/a450af2ce0c9f9908db467a4c1205702 to your computer and use it in GitHub Desktop.
Save tkusano/a450af2ce0c9f9908db467a4c1205702 to your computer and use it in GitHub Desktop.
ちゃーむずが共演したイベントの一覧
WITH q AS (
SELECT count(e.event_id),e.event_id,e.name,e.start_time
FROM event e,actor a,performer p
WHERE ( a.name='永野愛理' OR a.name='山下七海' )
AND e.event_id=p.event_id
AND p.person_id=a.actor_id
GROUP BY e.event_id )
SELECT * FROM q WHERE count=2 ORDER BY q.start_time;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment