Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started