We continue from the two tables in lab 3 part 2, and practice with functions and...

90.2K

Verified Solution

Question

Programming

We continue from the two tables in lab3 part 2, and practice with functions and the GROUP BY statement.The data in each table should be as below

Table Product:

PROD_ID

PROD_NAME

PROD_PRICE

PROD_VENDOR

1101

Table

100

2

1102

Chair

80

3

1103

Armchair

90

2

1104

Nightstand

110

1

1105

Bed

200

3

1106

Dresser

150

3

1107

Daybed

190

2

1108

Ash Table

120

2

1109

Cherry Table

130

2

1110

Table - High

100

2

1111

Office Chair

110

3

Table Vendor:

VEND_ID

VEND_NAME

VEND_ST

1

Green Way Inc

GA

2

Forrest LLC

NC

3

AmeriMart

NC

Please write the SQL script and providescreenshots of results for thesebelow queries. Please include the SQL in textformat, and all screenshots in one singledocument.

  1. Find the total number of table products
  2. Find the average price of all tables
  3. Find the total number of products from each vendor
  4. Find the average prices by vendors (please include vendor namesin the query result)
  5. Find the average prices by states

Answer & Explanation Solved by verified expert
4.2 Ratings (675 Votes)
SQL Query 1select countProdname as number of table product fromproductwhere Prodname like Tablequery result SQL Query    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students