Ask DBMS Expert


Home >> DBMS

Shipping Efficiency Query

You will create a query to calculate the number of days between the date an order was placed and the date the order was shipped for each order.

The result of your work will be a list of orders that took more than 30 days to ship. The salespeople will be required to review the records and report the source of the delay for each order. The CEO feels there may be issues with one of the shipping companies, and would like data to back that up.

a.Create a query using Query Design. From the Customers table, include the fields CompanyName, ContactName, ContactTitle, and Phone. From the Orders table, include the fields OrderID, OrderDate, and ShippedDate.

b.Run the query and examine the records. Save the query as Shipping Efficiency.

c.Add a calculated field named DaysToShip to calculate the number of days taken to fill each order. (Hint: The expression will include the OrderDate and the ShippedDate; the results will not contain negative numbers.)

d.Run the query and examine the results. Does the data in the DaysToShip field look accurate? Save the query.

e.Add criteria to limit the query results to include only orders that took more than 30 days to ship.

f.Add the Quantity field from the Order Details table and the ProductName field from the Products table to the query. Sort the query by ascending OrderID. When the sales reps contact these customers, these two fields will provide useful information about the orders.

g.Add the caption Days to Ship to the DaysToShip field. Switch to Datasheet view to view the results. Adjust column widths as necessary.
h.Save and close the query.

Order Summary Query

The CEO is considering the financial impact of discounts. She asked for a query showing the employee name, number of orders they have taken, and the total discount amount they have given customers. She hopes to see if there is a correlation between the discount offered and the number of sales.

a.Create a query using Query Design and add the Orders, Order Details, Products, and Customers tables. Add the fields OrderID and OrderDate from the Orders table. Set both fields' Total row to Group By.

b.Add a calculated field in the third column. Name the field ExtendedAmount. This field should multiply the quantity ordered (from the Order Details table) by the unit price for that item (from the Products table). This will calculate the total amount for each order. Format the calculated field as Currency and change the caption to Total Dollars. Change the Total row to Sum.

c.Add a calculated field in the fourth column. Name the field DiscountAmount. The field should multiply the quantity ordered, the unit price for that item, and the discount field (from the Customers table). This will calculate the total discount for each order. Format the calculated field as Currency and add a caption of Discount Amt. Change the Total row to Sum.

d.Run the query. Examine the results. Most customers should have a discount of 10% of the total dollars, but some customers will have no discount. Save the query as Order Summary. Return to Design view.

e.Add criteria to the OrderDate field so only orders made between 1/1/2016 and 12/31/2016 are displayed. Change the Total row to Where.

This expression will display only orders that were placed in 2016.

f.Run the query and view the results. Adjust column widths as necessary. Save and close the query.

Order Financing Query

The CEO would like the salespeople to discuss financing with customers. In order to do so, she would like you to create a query showing the impact on price for prior orders. This way, the reps can give customers a comparison with an order they have already placed. For the moment, she is considering a 5% interest rate, paid over 12 months. She would like you to leave the results as negative numbers.

a.Create a copy of the Order Summary query named Order Financing.

b.Open the Order Financing query in Design view and remove the DiscountAmount field.

c.Add a new field using the Expression Builder named SamplePayment. Insert the Pmt function with the following parameters:

•Use .05/12 for the rate argument (5% interest, paid monthly).

•Use the number 12 for the num_periods argument (12 months).

•Use the calculated field [ExtendedAmount] for the present_value.

•Use the value 0 for both future_value and type.

d.Change the Total row to Expression for the SamplePayment field.

e.Change the Format for the SamplePayment field to Currency.

f.Run the query and examine the results. Adjust column widths as necessary. The results appear as negative numbers, as requested. Save and close the query.

Order Summary by Country Query

The company is planning on opening up some shipping centers internationally. The previous CEO had been considering Brazil, Denmark, and Germany as potential shipping center locations, but he was working from older data. You will provide a list of total shipment value by country for the year before the current CEO started to best inform her decision making.

a.Create a copy of the Order Summary query named Order Summary by Country.

b.Open the query in Design view. Replace the OrderID field with the Country field from the Customers table.

c.Run the query and examine the summary records; there should be 21 countries listed.

d.Switch to Design view and change the sort order so that the country with the highest ExtendedAmount is first and the country with the lowest ExtendedAmount is last.

e.Run the query and verify the results. Note the ExtendedAmount field has a caption of Total Dollars, so this is the field the query will be sorted by.

f.Save and close the query.

Attachment:- Food-LastFirst.rar

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92757245
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in DBMS

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As