Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please, give possible solutions and answers. Module 5:SQL Questions Write SQL statements that will answer the following four questions based on the following tables. 1.

image text in transcribed

image text in transcribed

image text in transcribed

please, give possible solutions and answers.

Module 5:SQL Questions Write SQL statements that will answer the following four questions based on the following tables. 1. Find suppliers (company name, country and city) whose country is Australia or whose city is Paris. 2. Compute the extended price for each order. Extended price is obtained by multiplying unit price by quantity (from Order Details table). Show order id, product name and extended price. Sort the results by product name irn ascending order. 3. List products ids and product names of discontinued confection products that are still held in stock. (Confection products are those that have "Confections" as category name.) 4. Find the total quantity of each product ordered within each category Display the category id, category name, product name and total quantity Hints: The MONTH (D ateField) function can be used to evaluate crite ria about the month portion of a date field The FORMAT(DateField) function can be used to return the month names. The SELECT statement has several options that can be used to select a certain set of values from the resulting query. SELECT [ALL | DISTINCTDISTINCTROW| [TOP n [PERCENT]11 FROM Table ALL DISTINCT Default- selects all records Omits records that contain duplicate data in Omits data based on entire duplicate records Returns a certain number of records that fal1 the selected fields. not just duplicate fields at the top or the bottom of a range specified DISTINCTROW TOP n [Percent] by an ORDER BY clause. Tables and fields: Categories Name Type Size

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

Develop skills for building positive relationships.

Answered: 1 week ago