Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

ATTRIBUTES: http://167examples.azurewebsites.net/h5/

Requirements Answer the statements in the list below with the query and the answer for questions #1, 3, 9:

1.How many pets are in the pets table?

2.Find the first and last name of the Owner who has the phone number 3894093874.

3.How many cats?

4.Find the name and animal of the pets who are younger than 7

5.Find age, animal, and breed of the pet named Ron.

6.Show all the owners first name, last name, and phone in that order. Order in descending order by last name

7.What's the name of the only pet owl?

8.Order all pets by age in ascending order.

9.What is the name of the oldest pet?

EXAMPLE:

How many owners are in the owners table?

SELECT COUNT(*) FROM Owner;

Answer: 10 Owners

Handy Skills

SQL - SELECT + FROM - WHERE - COUNT - MAX

Use a INNER JOIN query to find out which owner doesn't have a pet.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ f. instituting laws against driving while intoxicated

Answered: 1 week ago