Write select statement that returns columns from order table

Assignment Help Database Management System
Reference no: EM13949114

1. Write a SELECT statement that returns these columns from the Products table:

The ListPrice column

The DiscountPercent column

A column named DiscountAmount that uses the previous two columns to calculate the discount amount and uses the ROUND function to round the result to 2 decimal places

2. Write a SELECT statement that returns these columns from the Orders table:

The OrderDate column

A column that returns the four-digit year that's stored in the OrderDate column

A column that returns only the day of the month that's stored in the OrderDate column.

A column that returns the result from adding thirty days to the OrderDate column.

3. Write a SELECT statement that returns these columns from the Orders table:

The CardNumber column

The length of the CardNumber column

The last four digits of the CardNumber column

When you get that working right, add the column that follows to the result set. This is more difficult because the column requires the use of functions within functions.

A column that displays the last four digits of the CardNumber column in this format: XXXX-XXXX-XXXX-1234. In other words, use Xs for the first 12 digits of the card number and actual numbers for the last four digits of the number.

4. Write a SELECT statement that returns these columns from the Orders table:

The OrderID column

The OrderDate column

A column named ApproxShipDate that's calculated by adding 2 days to the OrderDate column

The ShipDate column

A column named DaysToShip that shows the number of days between the order date and the ship date

When you have this working, add a WHERE clause that retrieves just the orders for March 2012.

5. Create a database diagram that shows the relationships between the seven tables in the MyGuitarShop database. (The administrators table is not related to the other six tables.

6. Design a database diagram for a database that stores information about the downloads that users make.

Each user must have an email address, first name, and last name.

Each user can have one or more downloads.

Each download must have a filename and download date/time.

Each product can be related to one or more downloads.

Each product must have a name.

Attachment:- CreateMyGuitarShop.zip

Reference no: EM13949114

Questions Cloud

Find e and the rotational losses : A 550-V series motor takes 112 A and operates at 820 r/min when the load is 75 hp. If the effective Ra = 0.1 Q Rf = 100 Q When running at 1,100 r/min with no load connected to the shaft, the motor draws 4 A from the line. Find E and the rotational..
State the appropriate null and alternative hypotheses : State the appropriate conclusion (Reject the null hypothesis, there is not significant evidence that the mean traveltime is less than 25 minutes. or Reject the null hypothesis, there is significant evidence that the mean travel time is less than 25 m..
Compute equivalent units for materials and conversion cost : Rade Company manufactures a product that passes through two processes. Prepare a physical flow schedule. Compute equivalent units for materials and for conversion cost.
Create a database with a table called "myusers" and "myrole" : The first form is a login page default.aspx Users cannot view the other forms until they have successfully logged onto the application
Write select statement that returns columns from order table : Write a SELECT statement that returns these columns from the Orders table
Differences between agency and stewardship theory : Discuss the differences between the "agency theory" and the "stewardship theory". Explain which of these theories applies to your strategic audit firm and why
Difference between the cpt definition of surgical package : Why you believe there is a difference, what difference, if any, it serves, and the impact of that difference. Make sure you are defining the two definitions in your response. Give an appropriate example of one or both of the CPT and Medicare surgi..
Calculate unit cost for the mixing department for june : Calculate unit cost for the Mixing Department for the month of June. Calculate the cost of units transferred out and the cost of ending work-in- process inventory.
Explain primary differences between an acquisiton : Explain the primary differences between an acquisiton and a reorganization. What are 2-3 tax aspects that need to be considered when undertaking these types of activities?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd