Question: Using the PETS table, write sql queries that will do the following: 1.Display the average weight of animals grouped by pet type. 2.Display a count

 Using the PETS table, write sql queries that will do the

Using the PETS table, write sql queries that will do the following:

1.Display the average weight of animals grouped by pet type.

2.Display a count of how many animals there are of each color.

3.Display the total weight of all Dogs broken down by location type (Indoor or outdoor).

4.Display the average weight of all cats broken down by color.

5.Write a single query that will give a count of animals by pet type, and the average weight of animals by pet type.

Columns Data Constraints lGrants IStatistics Triggers IFlashback Dependencies Details Partitions Indexes sQL (8) Actions COLUMN NAME DATA TYPE 1 PET ID 2 PET NAME 3 PET TYPE 4 PET DOB 5 PET WEIGHT NUMBER (5,0) 6 PET COLOR 7 PETLOCATION VARCHAR2 (10 BYTE) No 8 PET DEATH 9 LAST SHOT_DATE VARCHAR2 (10 BYTE) Yes NULLABLE DATA. DEFAULT 10 COLUMN-ID No COMMENTS (null) (null) inull) inull) inull) (null) (null) (null) (null) l (null] 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) NUMBER (5,0) VARCHAR2 (30 BYTE) No VARCHAR2 (20 BYTE) No DATE No No VARCHAR2 (25 BYTE) No DATE No

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!