Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi I need help with this challenge for sql I can't figure out what it needs me to do can someone help me with these

Hi I need help with this challenge for sql I can't figure out what it needs me to do can someone help me with these two challenges thank you

1.

Write the following task as a SQL statement in a new line (remember that you can source the file to compare the output reference):

Select the total stock and the total products from the e_store.products table in a single query. Alias the result as total_stock and total_count respectively. The output should look like this:

+-------------+----------------+ | total_stock | total_products | +-------------+----------------+ | 35 | 6 | +-------------+----------------+ 1 row in set (0.06 sec)

2.

Write each of the following tasks as a SQL statement in a new line (remember that you can source the file to compare the output reference):

Use the e_store database

Join the products and the reviews in a SELECT query that would output this:

+------------+--------+-------+-----------+ | name | price | stock | avg_stars | +------------+--------+-------+-----------+ | Tablet | 145.50 | 8 | 4.0000 | | Headphones | 20.00 | 6 | 3.5000 | | Monitor | 125.45 | 7 | 5.0000 | +------------+--------+-------+-----------+ 3 rows in set (0.01 sec) 

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_2

Step: 3

blur-text-image_3

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

How could assessment be used in an employee development program?

Answered: 1 week ago