diff --git a/lsqlthw-remnants/ex3-myself.sql b/lsqlthw-remnants/ex3-myself.sql index 391d32f..54273b4 100644 --- a/lsqlthw-remnants/ex3-myself.sql +++ b/lsqlthw-remnants/ex3-myself.sql @@ -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); diff --git a/lsqlthw-remnants/ex6.sql b/lsqlthw-remnants/ex6.sql new file mode 100644 index 0000000..0c30148 --- /dev/null +++ b/lsqlthw-remnants/ex6.sql @@ -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";