MySQL Forums
Forum List  »  PHP

Re: Query divides movie titles into different columns
Posted by: Luigi Chiabrera
Date: November 14, 2019 05:14PM

The query performs right

select actor_id, group_concat(distinct film_id order by film_id asc separator ' ')
from film_actor
group by actor_id

because the table 'film_actor' is structured like this:

CREATE TABLE `film_actor` (
`actor_id` smallint(5) UNSIGNED NOT NULL,
`film_id` smallint(5) UNSIGNED NOT NULL,
`role` varchar(50) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()

the 'title' column is in the 'film' table


Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.