Dusting off lsqlthw, up to ex6

This commit is contained in:
Dan Buch 2014-03-09 15:24:50 -04:00
parent af0ebf3072
commit bf4f303f5a
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@ INSERT INTO person (id, first_name, last_name, age)
VALUES (1, "Dan", "Buch", 31);
INSERT INTO pet (id, name, breed, age, dead)
VALUES (2, "Franny", "Dog", 14, 0);
VALUES (2, "Franny", "Dog", 14, 1);
INSERT INTO pet (id, name, breed, age, dead)
VALUES (3, "Zooey", "Cat", 7, 0);

6
lsqlthw-remnants/ex6.sql Normal file
View File

@ -0,0 +1,6 @@
SELECT pet.id, pet.name, pet.age, pet.dead
FROM pet, person_pet, person
WHERE
pet.id = person_pet.pet_id AND
person_pet.person_id = person.id AND
person.first_name = "Zed";