Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submit one .sql file only. Use comments to label the queries with the number of the exercise. Include USE statements or fully qualified names to

Submit one .sql file only. Use comments to label the queries with the number of the exercise. Include USE statements or fully qualified names to guarantee the correct database is being accessed.

Use the cape_codd database for questions 1-5.

1. Write an SQL statement to display the data for all columns from the retail_order table.

2. Write an SQL statement to display the data for 2 columns from the order_item table.

3. Write an SQL statement to display the data for 2 columns from the catalog_sku_2014 table.

4. Write an SQL statement to display the data for all columns from the catalog_sku_2015 table. Restrict the display to only 7 rows.

5. Write an SQL statement to display the Buyer and Department columns from the sku_data table. Restrict the display to 2 rows and remove all duplicate rows.

Use the VRG database for questions 6 and 7.

6. Write a SQL statement to display the data for all columns from the artist table.

7. Write a SQL statement to display the data for all columns from the trans table. Restrict the display to only 10 rows.

Check your answers using the following document.image text in transcribed

Order Number StoreNumber Order Total 10 1000 2000 3000 Store Zip 98110 02335 98110 Order Month December December January Order Year 2014 2014 2015 20 445.00 310.00 480.00 10 2. The two columns returned by your query may be different. 1 4 100200 101100 101100 101200 101200 201000 202000 NN 1 1 1 3. The two columns returned by your query may be different. 23 23 NULL 26 100 100 100300 100400 101100 101200 201000 202000 30 1000 30 2000 26 46 46 77 79 4. The 7 rows returned by your query may be different. SKU CatalogPage 23 23 27 CatalogID 20150001 20150002 20150003 20150004 20150005 20150006 20150007 100100 100200 101100 101200 201000 202000 203000 SKU_Description Std. Scuba Tank, Yellow Std. Scuba Tank, Magenta Dive Mask, Small Clear Dive Mask, Med Clear Half-dome Tent Half-dome Tent Vestibule Half-dome Tent Vestibule - Wide Department Water Sports Water Sports Water Sports Water Sports Camping Camping Camping DateOnWebSite 2015-01-01 2015-01-01 2015-08-01 2015-01-01 2015-01-01 2015-01-01 2015-04-01 27 45 45 NULL

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Explain the different types of marketing strategies.

Answered: 1 week ago

Question

Explain product positioning.

Answered: 1 week ago

Question

Explain Industrial market segment.

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago