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

  Relational algebra expressions for names of salespeople

Illustrate relational algebra expressions for names of all salespeople, names of all salespeople having ORDER row and names of salespeople not having ORDER row.

  Your database has been a hit you have been called back to

your database has been a hit. you have been called back to the customers headquarters and they want a detailed report

  Create state transition diagram to describes student states

Create a state transition diagram that describes typical student states and how they change based on specific actions and events.

  Explain why log records could be written between the begin

Explain why log records could be written between the begin checkpoint and end checkpoint records.

  Create a list of animals that are brown in colour

Create a list of animals that are "Brown" in colour and less than 2 years old. Show the animal name and species name. Create a view that lists all the animals that eat "straw". Show the animal no, animal name and scientific name.

  Creation of a data classification scheme

Creation of a data classification scheme. A discussion about the sensitivity and mapping of the data into the data classification scheme

  Variation of activity-based costing

Product cost of product U86Y under the company's traditional costing system is closest to - product cost of product M91F under the activity-based costing system

  Create a relational database model

Create an entity-relationshipdiagram showing the relationship between the entities (YouTube search term: entityrelationship diagram tutorial). Create a relational database model to describe the data(YouTube search term: relational database model)...

  Create a database design specification

Create a database design specification (Enhanced Entity Relationship Diagram (EERD) and Relational Data Model (RDM)) from the given business description. The RDM must be in 3rd Normal Form.

  Construct a query that will show the number of days

Construct a query that will show the number of days that exist between the first invoice and last invoice, for each month, for each employee, using the DATEDIFF function

  Transform the tables into one or more tables in bcnf

Transform the tables into one or more tables in BCNF. State the primary keys, candidate keys, and referential integrity constraints.

  Use of data definition language-data manipulation language

Pick one of the different types of SQL statements (data definition language, data manipulation language, or data control language). Describe how that type of statement is use.

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