Created
April 5, 2020 14:59
-
-
Save GravenilvecTV/7b9bde63a37dc9d6784491105c1b4640 to your computer and use it in GitHub Desktop.
Correction TP 17/30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nom FROM cheval | |
SELECT nom, prenom FROM jockey | |
INSERT INTO cheval("nom", "sexe", "poid") VALUES("Digital Phoenix", "M", 532) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nom from cheval WHERE sexe = "M" | |
SELECT id FROM jockey WHERE nom = "Midas" AND prenom = "Laurent" | |
SELECT SUM(distance) FROM course | |
UPDATE jockey | |
SET cheval_id = (SELECT id FROM cheval WHERE nom = "Digital Phoenix") | |
WHERE datenaissance = "5/04/1998" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select cheval.nom | |
FROM cheval, jockey, courseparticipant, course | |
WHERE courseparticipant.casaque = "bleu cassis" | |
AND courseparticipant.course_id = course.id | |
AND courseparticipant.jockey_id = jockey.id | |
AND jockey.cheval_id = cheval.id | |
SELECT AVG(cheval.poid) | |
FROM cheval, jockey, courseparticipant, course | |
WHERE course.nomprix = "Z Fury" | |
AND course.id = courseparticipant.course_id | |
AND courseparticipant.jockey_id = jockey.id | |
AND jockey.cheval_id = cheval.id | |
DELETE FROM courseparticipant | |
WHERE courseparticipant.id = (SELECT id FROM course WHERE nomprix = "Final Strike") | |
AND courseparticipant.jockey_id = 1 | |
SELECT cheval.nom, cheval.poid | |
FROM cheval, jockey, courseparticipant, course | |
WHERE course.nomprix = "Final Strike" | |
AND course.id = courseparticipant.course_id | |
AND courseparticipant.jockey_id = jockey.id | |
AND jockey.cheval_id = cheval.id | |
ORDER BY cheval.poid ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment