Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You are given a database of a pet adoption center. In this database is the Owner

ID: 3903743 • Letter: Y

Question

You are given a database of a pet adoption center. In this database is the Owner table, and the Pet table. You've been asked to write some queries to pass along some information Requirements Answer the statements in the list below with the query and the answer for questions #1, 3, 9 How many pets are in the pets table? Find the first and last name of the Owner who has the phone number 3894093874 How many cats? Find the name and animal of the pets who are younger than 7 Find age, animal, and breed of the pet named Ron. Show all the owners first name, last name, and phone in that order. Order in descending or- der by last name What's the name of the only pet owl? Order all pets by age in ascending order What is the name of the oldest pet? 1. 2. 3. 4. 5. 6. 7. 8. 9. Example How many owners are in the owners table? SELECT COUNT (*) FROM Owner 10 Owners Handy Skills SQL -SELECT +FROM WHERE - COUNT - MAX Rubric Submitted on time 10% Met all 9 requirements 90% Extra credit The greatest asset of tables in a relational database is that you are able to query data between two or more tables. This is done with a JOIN (https:/www.w3schools.com/sal/salL ioin.asp) Use a INNER JOIN query to find out which owner doesn't have a pet.

Explanation / Answer

Answer for part 1,2,3 and 9.

1) SELECT COUNT(*) FROM Pet;
2) SELECT Firstname, Lastname FROM Owner WHERE phone=3894093874;
3) SELECT COUNT(*) FROM Pet HAVING animal='cat';
9) SELECT name FROM Pet WHERE age=(SELECT MAX(age) FROM Pet);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote