1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SVETLANKA909090 [29]
3 years ago
13

Write a SELECT statement that uses an aggregate window function to get the total amount of each order. Return these columns: The

order_id column from the Order_Items table The total amount for each order item in the Order_Items table (Hint: You can calculate the total amount by subtracting the discount amount from the item price and then multiplying it by the quantity) The total amount for each order Sort the result set in ascending sequence by the order_id column.
Computers and Technology
1 answer:
Reika [66]3 years ago
8 0

<u>Answer alongwith Explanation:</u>

The following is the statement that uses an aggregate window function in order to get the total amount of each order.

SELECT isnull(p1.PName,'Total') As PName,

              Sum((t1.Price minus  t1.Discount ) multiply with Quantity) AS <u>TotalAmount </u>

FROM     Products AS t1

              JOIN OrderItems AS t2

              ON t1.ProductID = t2.ProductID

GROUP  BY Rollup(PName) ORDER BY order id ASC

Thus, it can be used for the function.

You might be interested in
Give a pseudo-code description of the O(n)-time algorithm for computing the power function p(x,n).Also draw the trace of computi
laila [671]

Answer:

p(x,n)

1. if(n==0)    [if power is 0]

2.    then result =1.

3.else

4. {    result=1.

5.      for i=1 to n.

6.          {  result = result * x. }  [each time we multiply x once]

7.       return result.

8.  }

Let's count p(3,3)

3\neq0, so come to else part.

i=1: result = result *3 = 3

i=2: result = result *3 = 9

i=2: result = result *3 = 27

Explanation:

here the for loop at step 4 takes O(n) time and other steps take constant time. So overall time complexity = O(n)

6 0
3 years ago
The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a
JulijaS [17]

Answer:

The correct answer to the following question will be "Semantic and Syntax error".

Explanation:

<u>Syntax error: </u>

Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.

<u>Semantic error: </u>

That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.

So, it's the right answer.

3 0
2 years ago
What is operating system​
iren [92.7K]

Answer:

It's simply a software that runs a computer's basic tasks, or functions, such as scheduling, running applications, and controlling peripherals.

3 0
3 years ago
Read 2 more answers
What Linux services can pose a problem when attempting to reach remote host on a network?
nekit [7.7K]

Answer:

NFS configuration

Explanation:

The Linux server runs the Linus open source operating system that provides a stable, secure and more flexible environment to carry out more challenging jobs like network and system administration, database management and web hosting.

The NFS or Network file system configured on the Linux server only supports Linux servers communication. It mounts the storage of the server on the network for central access.

4 0
3 years ago
Read 2 more answers
Consider the following language:
VMariaS [17]

L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

<h3>How do you know if a language is decidable?</h3>

A language is said to be decidable only when there seems to exists a Turing machine that is said to accepts it,

Here, it tends to halts on all inputs, and then it answers "Yes" on words that is seen in the language and says "No" on words that are not found in the language. The same scenario applies to recognizable language.

So,  L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

Learn more about programming language from

brainly.com/question/16936315

#SPJ1

8 0
1 year ago
Other questions:
  • Which elements in a web page require a visitor’s action?
    15·1 answer
  • What is a color that cannot be created by mixing other colors together?
    15·2 answers
  • __ is/are the amount of blank space between lines of text in a paragraph
    7·2 answers
  • Difference between ancient and modern mode of information <br> transmission
    12·1 answer
  • Midday is a good time to take a portrait outside.<br> true or false?
    8·1 answer
  • Need help please asap
    9·1 answer
  • You are responsible for a rail convoy of goods consisting of several boxcars. You start the train and after a few minutes you re
    8·1 answer
  • Will social media lose its relevance?​
    6·1 answer
  • Susan discovers the following log entries that occurred within seconds of each other in her Squert (a Sguil web interface) conso
    13·1 answer
  • You work part-time at a computer repair store. You're building a new computer. The customer has requested two serial ATA (SATA)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!