Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

an element of formality in the workplace between different levels;

Answered: 1 week ago

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago