Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We are preparing to archive old data from the Sales Orders Modify database. Before we do this, we would like to update the OrderTotal column

We are preparing to archive old data from the Sales Orders Modify database. Before we do this, we would like to update the OrderTotal column for each order to be sure that it reflects the total of the line items in that order. First, write a SELECT query showing what the OrderTotal should be for each order. Include three columns: the order number, the current order total and the calculated order total (as NewOrderTotal). Use a subquery as the third column to calculate the total of the line items for that order.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Lets assume table name as SalesOrders columns like OrderNumber ... 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

Management Accounting Information for Decision-Making and Strategy Execution

Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young

6th Edition

137024975, 978-0137024971

More Books

Students also viewed these Databases questions

Question

What do their students end up doing when they graduate?

Answered: 1 week ago

Question

Question 1 (a2) What is the reaction force Dx in [N]?

Answered: 1 week ago

Question

Can partitioned join be used for r r.A s? Explain your answer

Answered: 1 week ago

Question

What is the scientific management view of motivation?

Answered: 1 week ago

Question

What does a capital spending plan do?

Answered: 1 week ago