TP Studio Ghilbi Correction

TP Studio Ghilbi Correction
#

Ghilbi Intro

Objectifs#

  • Visualiser et travailler avec plusieurs tables d’une base de données SQL

  • Apprendre à écrire des lignes de commande SQL

  • Extraire des informations d’une base de données SQL

  • Développer un esprit critique sur les résultats obtenus

On commence par charger les décorateurs qui vont nous permettre de taper des lignes de commandes SQL et la base de données sur laquelle on va travailler.

%load_ext sql
%sql sqlite:///studio_ghilbi.sqlite

On visualise le ocntenu de notre base SQL :

%%sql
SELECT name FROM sqlite_master WHERE type='table';
 * sqlite:///studio_ghilbi.sqlite
Done.
name
film
personne
personnage
intervient_dans
est_de_type
produit_par
espece

Réponses#

  1. Lister toutes les informations concernant tous les films de la BDD.

%%sql
SELECT * FROM film;
 * sqlite:///studio_ghilbi.sqlite
Done.
id titre titre_original original_title_romanised image movie_banner description id_realisateur date_sortie duree rt_score
2baf70d1-42bb-4437-b551-e5fed5a87abe Castle in the Sky 天空の城ラピュタ Tenkū no shiro Rapyuta https://image.tmdb.org/t/p/w533_and_h300_bestv2/3cyjYtLWCBE1uvWINHFsFnE8LUK.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/npOnzAbLh6VOIu3naU5QaEcTepo.jpg" The orphan Sheeta inherited a mysterious crystal that links her to the mythical sky-kingdom of Laputa. With the help of resourceful Pazu and a rollicking band of sky pirates, she makes her way to the ruins of the once-great civilization. Sheeta and Pazu must outwit the evil Muska, who plans to use Laputa's science to make himself ruler of the world. 1 1986 124 95
12cfb892-aac0-4c5b-94af-521852e46d6a Grave of the Fireflies 火垂るの墓 Hotaru no haka https://image.tmdb.org/t/p/original/vkZSd0Lp8iCVBGpFH9L7LzLusjS.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/qG3RYlIVpTYclR9TYIsy8p7m7AT.jpg In the latter part of World War II, a boy and his sister, orphaned when their mother is killed in the firebombing of Tokyo, are left to survive on their own in what remains of civilian life in Japan. The plot follows this boy and his sister as they do their best to survive in the Japanese countryside, battling hunger, prejudice, and pride in their own quiet, personal battle. 2 1988 89 97
58611129-2dbc-4a81-a72f-77ddfc1b1b49 My Neighbor Totoro となりのトトロ Tonari no Totoro https://image.tmdb.org/t/p/original/etqr6fOOCXQOgwrQXaKwenTSuzx.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/rtGDOeG9LzoerkDGZF9dnVeLppL.jpg Two sisters move to the country with their father in order to be closer to their hospitalized mother, and discover the surrounding trees are inhabited by Totoros, magical spirits of the forest. When the youngest runs away from home, the older sister seeks help from the spirits to find her. 1 1988 86 93
ea660b10-85c4-4ae3-8a5f-41cea3648e3e Kiki's Delivery Service 魔女の宅急便 Majo no takkyūbin https://image.tmdb.org/t/p/original/h5pAEVma835u8xoE60kmLVopLct.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/7nO5DUMnGUuXrA4r2h6ESOKQRrx.jpg A young witch, on her mandatory year of independent life, finds fitting into a new community difficult while she supports herself by running an air courier service. 1 1989 102 96
4e236f34-b981-41c3-8c65-f8c9000b94e7 Only Yesterday おもひでぽろぽろ Omoide poro poro https://image.tmdb.org/t/p/w533_and_h300_bestv2/isCrlWWI4JrdLKAUAwFb5cjAsH4.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/xjJU6rwzLX7Jk8HFQfVW6H5guMC.jpg It’s 1982, and Taeko is 27 years old, unmarried, and has lived her whole life in Tokyo. She decides to visit her family in the countryside, and as the train travels through the night, memories flood back of her younger years: the first immature stirrings of romance, the onset of puberty, and the frustrations of math and boys. At the station she is met by young farmer Toshio, and the encounters with him begin to reconnect her to forgotten longings. In lyrical switches between the present and the past, Taeko contemplates the arc of her life, and wonders if she has been true to the dreams of her childhood self. 2 1991 118 100
ebbb6b7c-945c-41ee-a792-de0e43191bd8 Porco Rosso 紅の豚 Kurenai no buta https://image.tmdb.org/t/p/original/nAeCzilMRXvGaxiCpv63ZRVRVgh.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/byKAndF6KQSDpGxp1mTr23jPbYp.jpg Porco Rosso, known in Japan as Crimson Pig (Kurenai no Buta) is the sixth animated film by Hayao Miyazaki and released in 1992. You're introduced to an Italian World War I fighter ace, now living as a freelance bounty hunter chasing 'air pirates' in the Adriatic Sea. He has been given a curse that changed his head to that of a pig. Once called Marco Pagot, he is now known to the world as 'Porco Rosso', Italian for 'Red Pig.' 1 1992 93 94
1b67aa9a-2e4a-45af-ac98-64d6ad15b16c Pom Poko 平成狸合戦ぽんぽこ Heisei tanuki gassen Ponpoko https://image.tmdb.org/t/p/original/jScPd0u0jeo66l8gwDl7W9hDUnM.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/kowo9E1e1JcWLXj9cCvAOFZcy5n.jpg As the human city development encroaches on the raccoon population's forest and meadow habitat, the raccoons find themselves faced with the very real possibility of extinction. In response, the raccoons engage in a desperate struggle to stop the construction and preserve their home. 2 1994 119 78
ff24da26-a969-4f0e-ba1e-a122ead6c6e3 Whisper of the Heart 耳をすませば Mimi wo sumaseba https://image.tmdb.org/t/p/original/fRtaDgmj0CirvqFUG1XN48BDY1l.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/5E3Hvbu0bg38ouYf6chGftVGqZ7.jpg Shizuku lives a simple life, dominated by her love for stories and writing. One day she notices that all the library books she has have been previously checked out by the same person: 'Seiji Amasawa'. Curious as to who he is, Shizuku meets a boy her age whom she finds infuriating, but discovers to her shock that he is her 'Prince of Books'. As she grows closer to him, she realises that he merely read all those books to bring himself closer to her. The boy Seiji aspires to be a violin maker in Italy, and it is his dreams that make Shizuku realise that she has no clear path for her life. Knowing that her strength lies in writing, she tests her talents by writing a story about Baron, a cat statuette belonging to Seiji's grandfather. 5 1995 111 91
0440483e-ca0e-4120-8c50-4c8cd9b965d6 Princess Mononoke もののけ姫 Mononoke hime https://image.tmdb.org/t/p/original/6pTqSq0zYIWCsucJys8q5L92kUY.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/jHWmNr7m544fJ8eItsfNk8fs2Ed.jpg Ashitaka, a prince of the disappearing Ainu tribe, is cursed by a demonized boar god and must journey to the west to find a cure. Along the way, he encounters San, a young human woman fighting to protect the forest, and Lady Eboshi, who is trying to destroy it. Ashitaka must find a way to bring balance to this conflict. 1 1997 134 92
45204234-adfd-45cb-a505-a8e7a676b114 My Neighbors the Yamadas ホーホケキョ となりの山田くん Hōhokekyo tonari no Yamada-kun https://image.tmdb.org/t/p/original/nDOsicEg4RHDq0t23JKGSb58z6u.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/wTGuHmMIBBgKakY80J1D52VvQKI.jpg The Yamadas are a typical middle class Japanese family in urban Tokyo and this film shows us a variety of episodes of their lives. With tales that range from the humourous to the heartbreaking, we see this family cope with life's little conflicts, problems and joys in their own way. 2 1999 104 75
dc2e6bd1-8156-4886-adff-b39e6043af0c Spirited Away 千と千尋の神隠し Sen to Chihiro no kamikakushi https://image.tmdb.org/t/p/original/bSXfU4dwZyBA1vMmXvejdRXBvuF.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/39wmItIWsg5sZMyRUHLkWBcuVCM.jpg Spirited Away is an Oscar winning Japanese animated film about a ten year old girl who wanders away from her parents along a path that leads to a world ruled by strange and unusual monster-like animals. Her parents have been changed into pigs along with others inside a bathhouse full of these creatures. Will she ever see the world how it once was? 1 2001 124 97
90b72513-afd4-4570-84de-a56c312fdf81 The Cat Returns 猫の恩返し Neko no ongaeshi https://image.tmdb.org/t/p/original/d4BTZvckFTthyhGX27LZnWxl0tl.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/avPMO5cnaGHgLaNiAIhy33WoQLm.jpg Haru, a schoolgirl bored by her ordinary routine, saves the life of an unusual cat and suddenly her world is transformed beyond anything she ever imagined. The Cat King rewards her good deed with a flurry of presents, including a very shocking proposal of marriage to his son! Haru embarks on an unexpected journey to the Kingdom of Cats where her eyes are opened to a whole other world. 6 2002 75 89
cd3d059c-09f4-4ff3-8d63-bc765a5184fa Howl's Moving Castle ハウルの動く城 Hauru no ugoku shiro https://image.tmdb.org/t/p/original/hjlvbMKhQm7N8tYynr8yQ8GBmqe.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/TkTPELv4kC3u1lkloush8skOjE.jpg When Sophie, a shy young woman, is cursed with an old body by a spiteful witch, her only chance of breaking the spell lies with a self-indulgent yet insecure young wizard and his companions in his legged, walking home. 1 2004 119 87
112c1e67-726f-40b1-ac17-6974127bb9b9 Tales from Earthsea ゲド戦記 Gedo senki https://image.tmdb.org/t/p/original/j276noIGGmfi66EnCfewsL2OVTX.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/67yYwCPq7NbxSF6BIIXCMD34sY0.jpg Something bizarre has come over the land. The kingdom is deteriorating. People are beginning to act strange... What's even more strange is that people are beginning to see dragons, which shouldn't enter the world of humans. Due to all these bizarre events, Ged, a wandering wizard, is investigating the cause. During his journey, he meets Prince Arren, a young distraught teenage boy. While Arren may look like a shy young teen, he has a severe dark side, which grants him strength, hatred, ruthlessness and has no mercy, especially when it comes to protecting Teru. For the witch Kumo this is a perfect opportunity. She can use the boy's 'fears' against the very one who would help him, Ged. 7 2006 116 41
758bf02e-3122-46e0-884e-67cf83df1786 Ponyo 崖の上のポニョ Gake no ue no Ponyo https://image.tmdb.org/t/p/original/6a1qZ1qat26mAIK3Lq8iYdGpyHm.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/mikKSEdk5kLhflWXbp4S5mmHsDo.jpg The son of a sailor, 5-year old Sosuke lives a quiet life on an oceanside cliff with his mother Lisa. One fateful day, he finds a beautiful goldfish trapped in a bottle on the beach and upon rescuing her, names her Ponyo. But she is no ordinary goldfish. The daughter of a masterful wizard and a sea goddess, Ponyo uses her father's magic to transform herself into a young girl and quickly falls in love with Sosuke, but the use of such powerful sorcery causes a dangerous imbalance in the world. As the moon steadily draws nearer to the earth and Ponyo's father sends the ocean's mighty waves to find his daughter, the two children embark on an adventure of a lifetime to save the world and fulfill Ponyo's dreams of becoming human. 1 2008 100 92
2de9426b-914a-4a06-a3a0-5e6d9d3886f6 Arrietty 借りぐらしのアリエッティ Karigurashi no Arietti https://image.tmdb.org/t/p/original/7Z7WVzJsSReG8B0CaPk0bvWD7tK.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/oc2OB2KDmSRDMelKEAA1n4YRQL0.jpg 14-year-old Arrietty and the rest of the Clock family live in peaceful anonymity as they make their own home from items 'borrowed' from the house's human inhabitants. However, life changes for the Clocks when a human boy discovers Arrietty. 8 2010 94 95
45db04e4-304a-4933-9823-33f389e8d74d From Up on Poppy Hill コクリコ坂から Kokuriko zaka kara https://image.tmdb.org/t/p/original/xtPBZYaWQMQxRpy7mkdk5n1bTxs.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/rRLYX4RZIyloHSJwvZKAhphAjiB.jpg The story is set in 1963 in Yokohama. Kokuriko Manor sits on a hill overlooking the harbour. A 16 year-old girl, Umi, lives in that house. Every morning she raises a signal flag facing the sea. The flag means “I pray for safe voyages”. A 17 year-old boy, Shun, always sees this flag from the sea as he rides a tugboat to school. Gradually the pair are drawn to each other but they are faced with a sudden trial. Even so, they keep going without running from facing the hardships of reality. 7 2011 91 83
67405111-37a5-438f-81cc-4666af60c800 The Wind Rises 風立ちぬ Kaze tachinu https://image.tmdb.org/t/p/original/stM3jlD4nSJhlvR2DE7XnB0eN25.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/jfwSexzlIzaOgxP9A8bTA6t8YYb.jpg A lifelong love of flight inspires Japanese aviation engineer Jiro Horikoshi, whose storied career includes the creation of the A-6M World War II fighter plane. 1 2013 126 89
578ae244-7750-4d9f-867b-f3cd3d6fecf4 The Tale of the Princess Kaguya かぐや姫の物語 Kaguya-Hime no Monogatari https://image.tmdb.org/t/p/original/lMaWlYThCSnsmW3usxWTpSuyZp1.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/mWRQNlWXYYfd2z4FRm99MsgHgiA.jpg A bamboo cutter named Sanuki no Miyatsuko discovers a miniature girl inside a glowing bamboo shoot. Believing her to be a divine presence, he and his wife decide to raise her as their own, calling her 'Princess'. 2 2013 137 100
5fdfb320-2a02-49a7-94ff-5ca418cae602 When Marnie Was There 思い出のマーニー Omoide no Marnie https://image.tmdb.org/t/p/original/axUX7urQDwCGQ9qbgh2Yys7qY9J.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/vug1dvDI1tSa60Z8qjCuUE7ntkO.jpg The film follows Anna Sasaki living with her relatives in the seaside town. Anna comes across a nearby abandoned mansion, where she meets Marnie, a mysterious girl who asks her to promise to keep their secrets from everyone. As the summer progresses, Anna spends more time with Marnie, and eventually Anna learns the truth about her family and foster care. 8 2014 103 92
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 The Red Turtle レッドタートル ある島の物語 Reddotātoru aru shima no monogatari https://image.tmdb.org/t/p/original/kjXdW5H3myRBmTMYgKayjphr2FA.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/wOBU3SLjQ9358Km9YWYasPZyebp.jpg A man set adrift by a storm wakes up on a beach. He discovers that he is on a deserted island with plenty of fresh water, fruit and a dense bamboo forest. He builds a raft from bamboo and attempts to sail away, but his raft is destroyed by an unseen monster in the sea, forcing him back to the island. He tries again with another, larger raft, but is again foiled by the creature. A third attempt again ends with the raft destroyed, but this time he is confronted by a giant red turtle, which stares at him, and forces him back to the island. 10 2016 80 93
790e0028-a31c-4626-a694-86b7a8cada40 Earwig and the Witch アーヤと魔女 Āya to Majo https://www.themoviedb.org/t/p/original/qMxpGzmmnY1jLd4p7EhhoW43wWF.jpg https://www.themoviedb.org/t/p/w600_and_h900_bestv2/sJhFtY3eHuvvACaPpxpzdCLQqpQ.jpg An orphan girl, Earwig, is adopted by a witch and comes home to a spooky house filled with mystery and magic. 7 2021 82 30
  1. Comme les informations sont trop nombreuses, et que tout ne nous intéresse pas, on se contentera de la liste des titres et de leur année de réalisation seulement. On les rangera du film le moins récent au plus récent.

%%sql
SELECT titre, date_sortie 
FROM film
ORDER BY date_sortie ASC;
 * sqlite:///studio_ghilbi.sqlite
Done.
titre date_sortie
Castle in the Sky 1986
Grave of the Fireflies 1988
My Neighbor Totoro 1988
Kiki's Delivery Service 1989
Only Yesterday 1991
Porco Rosso 1992
Pom Poko 1994
Whisper of the Heart 1995
Princess Mononoke 1997
My Neighbors the Yamadas 1999
Spirited Away 2001
The Cat Returns 2002
Howl's Moving Castle 2004
Tales from Earthsea 2006
Ponyo 2008
Arrietty 2010
From Up on Poppy Hill 2011
The Wind Rises 2013
The Tale of the Princess Kaguya 2013
When Marnie Was There 2014
The Red Turtle 2016
Earwig and the Witch 2021
  1. Déterminer la table nécessaire et faire apparaître le nom de tous les personnages ainsi que leur âge. On les affichera par ordre alphabétique.

%%sql
SELECT nom
FROM personnage
ORDER BY nom ASC;
 * sqlite:///studio_ghilbi.sqlite
Done.
nom
Ashitaka
Baron Humbert von Gikkingen
Bella Yaga
Captain Dola
Cat King
Catbus
Charles
Chibi Totoro
Chihiro Ogino
Chu Totoro
Colonel Muska
Custard
Duffi
Earwig
Eboshi
General Mouro
Gonza
Granny
Haku
Haru
Henri
Hii-sama
Jigo
Jiji
Kanta Ōgaki
Kiki
Kohroku
Laputian Robot
Louis
Lusheeta Toel Ul Laputa
Madame
Mandrake
Mei Kusakabe
Moro
Motro
Natori
Niya
Okami
Osono
Pazu
Porco Rosso
Renaldo Moon aka Moon aka Muta
Romska Palo Ul Laputa
San
Satsuki Kusakabe
Scarlet Rose
Shishigami
Sosuke
Tatsuo Kusakabe
Thomas
Tombo
Totoro
Uncle Pom
Ursula
Yakul
Yasuko Kusakabe
Yuki
  1. Recommencer la même sélection, mais en faisant un tri croissant sur l’âge des personnages.

%%sql
SELECT nom, age
FROM personnage
ORDER BY age ASC;
 * sqlite:///studio_ghilbi.sqlite
Done.
nom age
Totoro
Chu Totoro
Chibi Totoro
Chihiro Ogino 10
Earwig 10
Satsuki Kusakabe 11
Kanta Ōgaki 11
Haku 12
Pazu 13
Lusheeta Toel Ul Laputa 13
Haru 13
Tombo 13
Kiki 13
San 17
Ursula 18
Osono 26
Louis 30
Moro 300
Romska Palo Ul Laputa 33
Colonel Muska 33
Tatsuo Kusakabe 37
Mei Kusakabe 4
Shishigami 400
Porco Rosso 47
Sosuke 5
Okami 50
Captain Dola 60
Madame 60
Cat King 87
Kohroku Adult
Gonza Adult
Yasuko Kusakabe Adult
Granny Elder
Jigo Middle age
Jiji NA
Catbus NA
Niya NA
Renaldo Moon aka Moon aka Muta NA
Yuki NA
Baron Humbert von Gikkingen NA
Natori NA
Bella Yaga NA
Mandrake NA
Scarlet Rose NA
Thomas NA
Custard NA
Hii-sama Over 50
Laputian Robot Really Old
Yakul Unknown
General Mouro Unspecified/Adult
Duffi Unspecified/Adult
Charles Unspecified/Adult
Henri Unspecified/Adult
Motro Unspecified/Adult
Eboshi Unspecified/Adult
Uncle Pom Unspecified/Elderly
Ashitaka late teens
  • Vérifier que le personnage le plus jeune avec un âge connu est «Mei Kusakabe».

Quelle remarque peut-on faire ?- Comment expliquer ce résultat ? Comment aurait-on pu éviter le problème ?

%%sql
SELECT nom, age
FROM personnage
ORDER BY age ASC
LIMIT 1;
 * sqlite:///studio_ghilbi.sqlite
Done.
nom age
Totoro

Ce résultat est probablement dû à la façon dont les valeurs NULL ou vides sont traitées dans SQL. Par défaut, les valeurs NULL ou les chaînes vides peuvent être considérées comme les “plus petites” valeurs lors du tri. Ainsi, lors d’un tri ascendant, un enregistrement sans valeur d’âge ou avec une chaîne vide pourrait apparaître en premier, même si ce n’est pas l’intention.

Pour éviter ce problème et s’assurer que seuls les personnages avec un âge connu et valide sont pris en compte, il faut explicitement exclure les enregistrements sans âge défini (c’est-à-dire NULL ou vides) et ceux avec des âges textuels non numériques. Voici comment procéder :

Exclure les valeurs NULL et les chaînes vides : En utilisant une clause WHERE pour filtrer les âges valides. Vérifier la validité des âges : S’assurer que les âges sont des valeurs numériques valides.

%%sql
SELECT nom, age
FROM personnage
WHERE age IS NOT NULL AND age != '' 
AND age REGEXP "^[0-9]+$"
ORDER BY CAST(age AS UNSIGNED) ASC
LIMIT 1;
 * sqlite:///studio_ghilbi.sqlite
Done.
nom age
Mei Kusakabe 4
  1. Afficher maintenant les titres des 5 films les plus courts ainsi que leur durée.

%%sql 
SELECT titre, duree
FROM film
ORDER BY duree ASC
LIMIT 5;
 * sqlite:///studio_ghilbi.sqlite
Done.
titre duree
Ponyo 100
Kiki's Delivery Service 102
When Marnie Was There 103
My Neighbors the Yamadas 104
Whisper of the Heart 111
  1. Afficher l’URL de l’affiche du film «Castle in the Sky», il s’agit de la colonne movie_banner. Visualiser le résultat dans un nouvel onglet.

%%sql
SELECT movie_banner
FROM film
WHERE titre = "Castle in the Sky";
 * sqlite:///studio_ghilbi.sqlite
Done.
movie_banner
https://image.tmdb.org/t/p/w600_and_h900_bestv2/npOnzAbLh6VOIu3naU5QaEcTepo.jpg"
  1. Compter le nombre de personnages dans la BDD.

%%sql
SELECT COUNT(nom) as "Nombre de personnage"
FROM personnage;
 * sqlite:///studio_ghilbi.sqlite
Done.
Nombre de personnage
57
  1. Afficher la liste des films réalisés entre les années 1995 et 2005 exclues.

%%sql
PRAGMA table_info(film);
 * sqlite:///studio_ghilbi.sqlite
Done.
cid name type notnull dflt_value pk
0 id 0 None 0
1 titre 0 None 0
2 titre_original 0 None 0
3 original_title_romanised 0 None 0
4 image 0 None 0
5 movie_banner 0 None 0
6 description 0 None 0
7 id_realisateur 0 None 0
8 date_sortie 0 None 0
9 duree 0 None 0
10 rt_score 0 None 0
%%sql
SELECT titre, date_sortie
FROM film
WHERE date_sortie > "1995" 
AND date_sortie < "2005";
 * sqlite:///studio_ghilbi.sqlite
Done.
titre date_sortie
Princess Mononoke 1997
My Neighbors the Yamadas 1999
Spirited Away 2001
The Cat Returns 2002
Howl's Moving Castle 2004
  1. Afficher les films réalisés par «Hayao Miyazaki»

%%sql
SELECT *
FROM personne;
 * sqlite:///studio_ghilbi.sqlite
Done.
id nom
1 Hayao Miyazaki
2 Isao Takahata
3 Toru Hara
4 Toshio Suzuki
5 Yoshifumi Kondō
6 Hiroyuki Morita
7 Gorō Miyazaki
8 Hiromasa Yonebayashi
9 Yoshiaki Nishimura
10 Michaël Dudok de Wit
11 Vincent Maraval
12 Pascal Caucheteux
13 Grégoire Sorlat
%%sql
SELECT DISTINCT film.titre
FROM film
JOIN produit_par ON film.id_realisateur=produit_par.id_personne
WHERE film.id_realisateur = "1"
 * sqlite:///studio_ghilbi.sqlite
Done.
titre
Castle in the Sky
My Neighbor Totoro
Kiki's Delivery Service
Porco Rosso
Princess Mononoke
Spirited Away
Howl's Moving Castle
Ponyo
The Wind Rises
  1. Afficher les films réalisés par la famille «Miyazaki»

%%sql
SELECT DISTINCT film.titre
FROM film
WHERE film.id_realisateur = '1' or film.id_realisateur = "7"
 * sqlite:///studio_ghilbi.sqlite
Done.
titre
Castle in the Sky
My Neighbor Totoro
Kiki's Delivery Service
Porco Rosso
Princess Mononoke
Spirited Away
Howl's Moving Castle
Tales from Earthsea
Ponyo
From Up on Poppy Hill
The Wind Rises
Earwig and the Witch
  1. Compter le nombre de films réalisés par «Isao Takahata»

%%sql
SELECT COUNT(DISTINCT film.titre) as "nombre de films réalisés par «Isao Takahata»"
FROM film
JOIN produit_par ON film.id_realisateur=produit_par.id_personne
WHERE film.id_realisateur = '2' 
 * sqlite:///studio_ghilbi.sqlite
Done.
nombre de films réalisés par «Isao Takahata»
5
  1. Afficher les films dont le réalisateur est aussi le producteur.

%%sql 
SELECT DISTINCT titre
FROM film
JOIN produit_par ON film.id_realisateur=produit_par.id_personne
 * sqlite:///studio_ghilbi.sqlite
Done.
titre
Castle in the Sky
Grave of the Fireflies
My Neighbor Totoro
Kiki's Delivery Service
Only Yesterday
Porco Rosso
Pom Poko
Princess Mononoke
My Neighbors the Yamadas
Spirited Away
Howl's Moving Castle
Ponyo
The Wind Rises
The Tale of the Princess Kaguya
%%sql 
SELECT *
FROM film
 * sqlite:///studio_ghilbi.sqlite
Done.
id titre titre_original original_title_romanised image movie_banner description id_realisateur date_sortie duree rt_score
2baf70d1-42bb-4437-b551-e5fed5a87abe Castle in the Sky 天空の城ラピュタ Tenkū no shiro Rapyuta https://image.tmdb.org/t/p/w533_and_h300_bestv2/3cyjYtLWCBE1uvWINHFsFnE8LUK.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/npOnzAbLh6VOIu3naU5QaEcTepo.jpg" The orphan Sheeta inherited a mysterious crystal that links her to the mythical sky-kingdom of Laputa. With the help of resourceful Pazu and a rollicking band of sky pirates, she makes her way to the ruins of the once-great civilization. Sheeta and Pazu must outwit the evil Muska, who plans to use Laputa's science to make himself ruler of the world. 1 1986 124 95
12cfb892-aac0-4c5b-94af-521852e46d6a Grave of the Fireflies 火垂るの墓 Hotaru no haka https://image.tmdb.org/t/p/original/vkZSd0Lp8iCVBGpFH9L7LzLusjS.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/qG3RYlIVpTYclR9TYIsy8p7m7AT.jpg In the latter part of World War II, a boy and his sister, orphaned when their mother is killed in the firebombing of Tokyo, are left to survive on their own in what remains of civilian life in Japan. The plot follows this boy and his sister as they do their best to survive in the Japanese countryside, battling hunger, prejudice, and pride in their own quiet, personal battle. 2 1988 89 97
58611129-2dbc-4a81-a72f-77ddfc1b1b49 My Neighbor Totoro となりのトトロ Tonari no Totoro https://image.tmdb.org/t/p/original/etqr6fOOCXQOgwrQXaKwenTSuzx.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/rtGDOeG9LzoerkDGZF9dnVeLppL.jpg Two sisters move to the country with their father in order to be closer to their hospitalized mother, and discover the surrounding trees are inhabited by Totoros, magical spirits of the forest. When the youngest runs away from home, the older sister seeks help from the spirits to find her. 1 1988 86 93
ea660b10-85c4-4ae3-8a5f-41cea3648e3e Kiki's Delivery Service 魔女の宅急便 Majo no takkyūbin https://image.tmdb.org/t/p/original/h5pAEVma835u8xoE60kmLVopLct.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/7nO5DUMnGUuXrA4r2h6ESOKQRrx.jpg A young witch, on her mandatory year of independent life, finds fitting into a new community difficult while she supports herself by running an air courier service. 1 1989 102 96
4e236f34-b981-41c3-8c65-f8c9000b94e7 Only Yesterday おもひでぽろぽろ Omoide poro poro https://image.tmdb.org/t/p/w533_and_h300_bestv2/isCrlWWI4JrdLKAUAwFb5cjAsH4.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/xjJU6rwzLX7Jk8HFQfVW6H5guMC.jpg It’s 1982, and Taeko is 27 years old, unmarried, and has lived her whole life in Tokyo. She decides to visit her family in the countryside, and as the train travels through the night, memories flood back of her younger years: the first immature stirrings of romance, the onset of puberty, and the frustrations of math and boys. At the station she is met by young farmer Toshio, and the encounters with him begin to reconnect her to forgotten longings. In lyrical switches between the present and the past, Taeko contemplates the arc of her life, and wonders if she has been true to the dreams of her childhood self. 2 1991 118 100
ebbb6b7c-945c-41ee-a792-de0e43191bd8 Porco Rosso 紅の豚 Kurenai no buta https://image.tmdb.org/t/p/original/nAeCzilMRXvGaxiCpv63ZRVRVgh.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/byKAndF6KQSDpGxp1mTr23jPbYp.jpg Porco Rosso, known in Japan as Crimson Pig (Kurenai no Buta) is the sixth animated film by Hayao Miyazaki and released in 1992. You're introduced to an Italian World War I fighter ace, now living as a freelance bounty hunter chasing 'air pirates' in the Adriatic Sea. He has been given a curse that changed his head to that of a pig. Once called Marco Pagot, he is now known to the world as 'Porco Rosso', Italian for 'Red Pig.' 1 1992 93 94
1b67aa9a-2e4a-45af-ac98-64d6ad15b16c Pom Poko 平成狸合戦ぽんぽこ Heisei tanuki gassen Ponpoko https://image.tmdb.org/t/p/original/jScPd0u0jeo66l8gwDl7W9hDUnM.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/kowo9E1e1JcWLXj9cCvAOFZcy5n.jpg As the human city development encroaches on the raccoon population's forest and meadow habitat, the raccoons find themselves faced with the very real possibility of extinction. In response, the raccoons engage in a desperate struggle to stop the construction and preserve their home. 2 1994 119 78
ff24da26-a969-4f0e-ba1e-a122ead6c6e3 Whisper of the Heart 耳をすませば Mimi wo sumaseba https://image.tmdb.org/t/p/original/fRtaDgmj0CirvqFUG1XN48BDY1l.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/5E3Hvbu0bg38ouYf6chGftVGqZ7.jpg Shizuku lives a simple life, dominated by her love for stories and writing. One day she notices that all the library books she has have been previously checked out by the same person: 'Seiji Amasawa'. Curious as to who he is, Shizuku meets a boy her age whom she finds infuriating, but discovers to her shock that he is her 'Prince of Books'. As she grows closer to him, she realises that he merely read all those books to bring himself closer to her. The boy Seiji aspires to be a violin maker in Italy, and it is his dreams that make Shizuku realise that she has no clear path for her life. Knowing that her strength lies in writing, she tests her talents by writing a story about Baron, a cat statuette belonging to Seiji's grandfather. 5 1995 111 91
0440483e-ca0e-4120-8c50-4c8cd9b965d6 Princess Mononoke もののけ姫 Mononoke hime https://image.tmdb.org/t/p/original/6pTqSq0zYIWCsucJys8q5L92kUY.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/jHWmNr7m544fJ8eItsfNk8fs2Ed.jpg Ashitaka, a prince of the disappearing Ainu tribe, is cursed by a demonized boar god and must journey to the west to find a cure. Along the way, he encounters San, a young human woman fighting to protect the forest, and Lady Eboshi, who is trying to destroy it. Ashitaka must find a way to bring balance to this conflict. 1 1997 134 92
45204234-adfd-45cb-a505-a8e7a676b114 My Neighbors the Yamadas ホーホケキョ となりの山田くん Hōhokekyo tonari no Yamada-kun https://image.tmdb.org/t/p/original/nDOsicEg4RHDq0t23JKGSb58z6u.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/wTGuHmMIBBgKakY80J1D52VvQKI.jpg The Yamadas are a typical middle class Japanese family in urban Tokyo and this film shows us a variety of episodes of their lives. With tales that range from the humourous to the heartbreaking, we see this family cope with life's little conflicts, problems and joys in their own way. 2 1999 104 75
dc2e6bd1-8156-4886-adff-b39e6043af0c Spirited Away 千と千尋の神隠し Sen to Chihiro no kamikakushi https://image.tmdb.org/t/p/original/bSXfU4dwZyBA1vMmXvejdRXBvuF.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/39wmItIWsg5sZMyRUHLkWBcuVCM.jpg Spirited Away is an Oscar winning Japanese animated film about a ten year old girl who wanders away from her parents along a path that leads to a world ruled by strange and unusual monster-like animals. Her parents have been changed into pigs along with others inside a bathhouse full of these creatures. Will she ever see the world how it once was? 1 2001 124 97
90b72513-afd4-4570-84de-a56c312fdf81 The Cat Returns 猫の恩返し Neko no ongaeshi https://image.tmdb.org/t/p/original/d4BTZvckFTthyhGX27LZnWxl0tl.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/avPMO5cnaGHgLaNiAIhy33WoQLm.jpg Haru, a schoolgirl bored by her ordinary routine, saves the life of an unusual cat and suddenly her world is transformed beyond anything she ever imagined. The Cat King rewards her good deed with a flurry of presents, including a very shocking proposal of marriage to his son! Haru embarks on an unexpected journey to the Kingdom of Cats where her eyes are opened to a whole other world. 6 2002 75 89
cd3d059c-09f4-4ff3-8d63-bc765a5184fa Howl's Moving Castle ハウルの動く城 Hauru no ugoku shiro https://image.tmdb.org/t/p/original/hjlvbMKhQm7N8tYynr8yQ8GBmqe.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/TkTPELv4kC3u1lkloush8skOjE.jpg When Sophie, a shy young woman, is cursed with an old body by a spiteful witch, her only chance of breaking the spell lies with a self-indulgent yet insecure young wizard and his companions in his legged, walking home. 1 2004 119 87
112c1e67-726f-40b1-ac17-6974127bb9b9 Tales from Earthsea ゲド戦記 Gedo senki https://image.tmdb.org/t/p/original/j276noIGGmfi66EnCfewsL2OVTX.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/67yYwCPq7NbxSF6BIIXCMD34sY0.jpg Something bizarre has come over the land. The kingdom is deteriorating. People are beginning to act strange... What's even more strange is that people are beginning to see dragons, which shouldn't enter the world of humans. Due to all these bizarre events, Ged, a wandering wizard, is investigating the cause. During his journey, he meets Prince Arren, a young distraught teenage boy. While Arren may look like a shy young teen, he has a severe dark side, which grants him strength, hatred, ruthlessness and has no mercy, especially when it comes to protecting Teru. For the witch Kumo this is a perfect opportunity. She can use the boy's 'fears' against the very one who would help him, Ged. 7 2006 116 41
758bf02e-3122-46e0-884e-67cf83df1786 Ponyo 崖の上のポニョ Gake no ue no Ponyo https://image.tmdb.org/t/p/original/6a1qZ1qat26mAIK3Lq8iYdGpyHm.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/mikKSEdk5kLhflWXbp4S5mmHsDo.jpg The son of a sailor, 5-year old Sosuke lives a quiet life on an oceanside cliff with his mother Lisa. One fateful day, he finds a beautiful goldfish trapped in a bottle on the beach and upon rescuing her, names her Ponyo. But she is no ordinary goldfish. The daughter of a masterful wizard and a sea goddess, Ponyo uses her father's magic to transform herself into a young girl and quickly falls in love with Sosuke, but the use of such powerful sorcery causes a dangerous imbalance in the world. As the moon steadily draws nearer to the earth and Ponyo's father sends the ocean's mighty waves to find his daughter, the two children embark on an adventure of a lifetime to save the world and fulfill Ponyo's dreams of becoming human. 1 2008 100 92
2de9426b-914a-4a06-a3a0-5e6d9d3886f6 Arrietty 借りぐらしのアリエッティ Karigurashi no Arietti https://image.tmdb.org/t/p/original/7Z7WVzJsSReG8B0CaPk0bvWD7tK.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/oc2OB2KDmSRDMelKEAA1n4YRQL0.jpg 14-year-old Arrietty and the rest of the Clock family live in peaceful anonymity as they make their own home from items 'borrowed' from the house's human inhabitants. However, life changes for the Clocks when a human boy discovers Arrietty. 8 2010 94 95
45db04e4-304a-4933-9823-33f389e8d74d From Up on Poppy Hill コクリコ坂から Kokuriko zaka kara https://image.tmdb.org/t/p/original/xtPBZYaWQMQxRpy7mkdk5n1bTxs.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/rRLYX4RZIyloHSJwvZKAhphAjiB.jpg The story is set in 1963 in Yokohama. Kokuriko Manor sits on a hill overlooking the harbour. A 16 year-old girl, Umi, lives in that house. Every morning she raises a signal flag facing the sea. The flag means “I pray for safe voyages”. A 17 year-old boy, Shun, always sees this flag from the sea as he rides a tugboat to school. Gradually the pair are drawn to each other but they are faced with a sudden trial. Even so, they keep going without running from facing the hardships of reality. 7 2011 91 83
67405111-37a5-438f-81cc-4666af60c800 The Wind Rises 風立ちぬ Kaze tachinu https://image.tmdb.org/t/p/original/stM3jlD4nSJhlvR2DE7XnB0eN25.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/jfwSexzlIzaOgxP9A8bTA6t8YYb.jpg A lifelong love of flight inspires Japanese aviation engineer Jiro Horikoshi, whose storied career includes the creation of the A-6M World War II fighter plane. 1 2013 126 89
578ae244-7750-4d9f-867b-f3cd3d6fecf4 The Tale of the Princess Kaguya かぐや姫の物語 Kaguya-Hime no Monogatari https://image.tmdb.org/t/p/original/lMaWlYThCSnsmW3usxWTpSuyZp1.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/mWRQNlWXYYfd2z4FRm99MsgHgiA.jpg A bamboo cutter named Sanuki no Miyatsuko discovers a miniature girl inside a glowing bamboo shoot. Believing her to be a divine presence, he and his wife decide to raise her as their own, calling her 'Princess'. 2 2013 137 100
5fdfb320-2a02-49a7-94ff-5ca418cae602 When Marnie Was There 思い出のマーニー Omoide no Marnie https://image.tmdb.org/t/p/original/axUX7urQDwCGQ9qbgh2Yys7qY9J.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/vug1dvDI1tSa60Z8qjCuUE7ntkO.jpg The film follows Anna Sasaki living with her relatives in the seaside town. Anna comes across a nearby abandoned mansion, where she meets Marnie, a mysterious girl who asks her to promise to keep their secrets from everyone. As the summer progresses, Anna spends more time with Marnie, and eventually Anna learns the truth about her family and foster care. 8 2014 103 92
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 The Red Turtle レッドタートル ある島の物語 Reddotātoru aru shima no monogatari https://image.tmdb.org/t/p/original/kjXdW5H3myRBmTMYgKayjphr2FA.jpg https://image.tmdb.org/t/p/w600_and_h900_bestv2/wOBU3SLjQ9358Km9YWYasPZyebp.jpg A man set adrift by a storm wakes up on a beach. He discovers that he is on a deserted island with plenty of fresh water, fruit and a dense bamboo forest. He builds a raft from bamboo and attempts to sail away, but his raft is destroyed by an unseen monster in the sea, forcing him back to the island. He tries again with another, larger raft, but is again foiled by the creature. A third attempt again ends with the raft destroyed, but this time he is confronted by a giant red turtle, which stares at him, and forces him back to the island. 10 2016 80 93
790e0028-a31c-4626-a694-86b7a8cada40 Earwig and the Witch アーヤと魔女 Āya to Majo https://www.themoviedb.org/t/p/original/qMxpGzmmnY1jLd4p7EhhoW43wWF.jpg https://www.themoviedb.org/t/p/w600_and_h900_bestv2/sJhFtY3eHuvvACaPpxpzdCLQqpQ.jpg An orphan girl, Earwig, is adopted by a witch and comes home to a spooky house filled with mystery and magic. 7 2021 82 30
%%sql 
SELECT *
FROM personne
 * sqlite:///studio_ghilbi.sqlite
Done.
id nom
1 Hayao Miyazaki
2 Isao Takahata
3 Toru Hara
4 Toshio Suzuki
5 Yoshifumi Kondō
6 Hiroyuki Morita
7 Gorō Miyazaki
8 Hiromasa Yonebayashi
9 Yoshiaki Nishimura
10 Michaël Dudok de Wit
11 Vincent Maraval
12 Pascal Caucheteux
13 Grégoire Sorlat
%%sql 
SELECT *
FROM produit_par
 * sqlite:///studio_ghilbi.sqlite
Done.
id_film id_personne
2baf70d1-42bb-4437-b551-e5fed5a87abe 2
12cfb892-aac0-4c5b-94af-521852e46d6a 3
58611129-2dbc-4a81-a72f-77ddfc1b1b49 1
ea660b10-85c4-4ae3-8a5f-41cea3648e3e 1
4e236f34-b981-41c3-8c65-f8c9000b94e7 4
ebbb6b7c-945c-41ee-a792-de0e43191bd8 4
1b67aa9a-2e4a-45af-ac98-64d6ad15b16c 4
ff24da26-a969-4f0e-ba1e-a122ead6c6e3 4
0440483e-ca0e-4120-8c50-4c8cd9b965d6 4
45204234-adfd-45cb-a505-a8e7a676b114 4
dc2e6bd1-8156-4886-adff-b39e6043af0c 4
90b72513-afd4-4570-84de-a56c312fdf81 4
cd3d059c-09f4-4ff3-8d63-bc765a5184fa 4
112c1e67-726f-40b1-ac17-6974127bb9b9 4
758bf02e-3122-46e0-884e-67cf83df1786 4
2de9426b-914a-4a06-a3a0-5e6d9d3886f6 4
45db04e4-304a-4933-9823-33f389e8d74d 4
67405111-37a5-438f-81cc-4666af60c800 4
578ae244-7750-4d9f-867b-f3cd3d6fecf4 9
5fdfb320-2a02-49a7-94ff-5ca418cae602 9
790e0028-a31c-4626-a694-86b7a8cada40 4
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 2
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 4
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 11
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 12
d868e6ec-c44a-405b-8fa6-f7f0f8cfb500 13
  1. Afficher les films produits par «Hayao Miyazaki»

  1. Afficher les personnages du film «My Neighbor Totoro»

  1. Dans quels films apparaît le personnage du «Baron Humbert von Gikkingen»

  1. Donner la liste de tous les personnages non “Human” et leur type.

  1. Donner la liste de tous les personnages non humains du film «My Neighbor Totoro», ainsi que leur espèce.