public.actor_info
Documentation | Pagila |
Schema | public |
Name | actor_info |
Module | Views |
The actor_info view provides a list of all actors, including the films in which they have performed, broken down by category.
The staff_list view incorporates data from the film, actor, category, film_actor, and film_category tables.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | actor_id | integer | The actor ID. | |||||
The actor ID. |
||||||||
2 | first_name | character varying(45) | The actor's first name. | |||||
The actor's first name. |
||||||||
3 | last_name | character varying(45) | The actor's last name. | |||||
The actor's last name. |
||||||||
4 | film_info | text | Information about film - name and title. | |||||
Information about film - name and title. |
Uses
Name |
---|
public.actor_info
|
Script
SELECT a.actor_id, a.first_name, a.last_name, group_concat(DISTINCT (((c.name)::text || ': '::text) || ( SELECT group_concat((f.title)::text) AS group_concat FROM ((film f JOIN film_category fc_1 ON ((f.film_id = fc_1.film_id))) JOIN film_actor fa_1 ON ((f.film_id = fa_1.film_id))) WHERE ((fc_1.category_id = c.category_id) AND (fa_1.actor_id = a.actor_id)) GROUP BY fa_1.actor_id))) AS film_info FROM (((actor a LEFT JOIN film_actor fa ON ((a.actor_id = fa.actor_id))) LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id))) LEFT JOIN category c ON ((fc.category_id = c.category_id))) GROUP BY a.actor_id, a.first_name, a.last_name; |
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25