Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH CTE (first_name, last_name, title)
- AS
- (
- SELECT actor.first_name,
- actor.last_name,
- film.title
- FROM actor
- JOIN film_actor
- ON actor.actor_id = film_actor.actor_id
- JOIN film
- ON film_actor.film_id = film.film_id
- )
- SELECT CTE.first_name, CTE.last_name, GROUP_CONCAT(CTE.title) as titles
- FROM CTE
- GROUP BY CTE.first_name, CTE.last_name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement