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
Amanda [17]
3 years ago
8

Write a SELECT statement that returns these columns from the Orders table: The order_id column The order_date column A column na

med approx_ship_date that’s calculated by adding 5 days to the order_date column The ship_date column A column named days_to_ship 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 2018.
Computers and Technology
1 answer:
valkas [14]3 years ago
7 0

Answer:

SELECT order_id, order_date,

DATEADD(DAY,5,order_date) AS approx_ship_date,

ship_date,

DATEDIFF(DAY,ship_date,DATEADD(DAY,2,order_date)) AS days_to_ship

FROM Orders

WHERE YEAR(order_date) = 2018 AND MONTH(order_date) = 3                            

Explanation:

The first line of the SQL statement is a SELECT statement which selects    order_id, order_date and ship_date columns from Orders table.

The DATEADD() is used to add date and here it is used to add 5 days to order_date column and the resultant column is named as approx_ship_date using ALIAS.

DATEDIFF() function is used to return the difference between two dates and here it shows number of days between order_date and ship_date columns.

WHERE clause is used to retrieve orders from March 2018. YEAR function represents the year of order_date which is set as 2018 to retrieve the orders for 2018. MONTH function represents the month of order_date which is set to 3 which means March in order to retrieve the orders for March.

You might be interested in
Why does brainly not let me see when people comment on my questions it just lets me see the answers they put? Is there a way I c
Ganezh [65]

Answer:

Go to your profile. then click edit. then click preferences and make sure the outlined box is checked

Explanation:

refer to image below

8 0
3 years ago
Read 2 more answers
In the scene where we see Don and Lina acting in a silent film (beginning at time code 11:05), describe the silent film. How is
asambeis [7]
Well, it was black and white…and it was silent. That's a lot different from today because we have surround sound, color TV, 3D/4D etc.

(I wish there was more to go on, but from time code 11:05 it only lasted for a few seconds. Hope this helps!)

4 0
4 years ago
What do all social media sites have in common? (Must check all that apply)
Georgia [21]
* <span>They all engage users with fun or interesting features.
*</span><span>They encourage people to participate.</span>
3 0
3 years ago
(3)(6 Points) During a sale at a store, a 10% discount is applied to purchases over $10.00. Write a program that asks for the am
Galina-37 [17]
I only need point sort
7 0
3 years ago
Why are cyber attacks using SWIFT so dangerous?​
Kipish [7]

Answer:

options below you can select the ans

SWIFT is the protocol used by all US healthcare provides to encrypt medical records

SWIFT is the fight plan and routing system used by all cooperating nations for International commercial flights

SWIFT is the protocol used to transmit all diplomatic telegrams between governments around the world

SWIFT is the protocol used by all banks to transfer money

5 0
3 years ago
Other questions:
  • A(n) ______ is an output device that visually conveys text, graphics, and video information.
    5·1 answer
  • ​​most code division multiple access (cdma) networks conform to ____________ , created by the telecommunications industry associ
    10·1 answer
  • Anyone free to inbox me plz....​
    6·2 answers
  • What is a main benefit of using Search Audience solutions?a. They identify ad extension opportunities to improve average click-t
    11·1 answer
  • Give three reasons why you think ETL functions are mostchallenging in data warehouse environment.
    13·1 answer
  • Provides images of weather systems, and helps to track storms at different altitudes
    7·1 answer
  • b) Derive the logic expressions for the incrementor and 7-sgement decoder. Since software can perform gate-level optimization, y
    7·1 answer
  • I Promise Brainliest !!!!! Describe how the aperture size relates to the size of the lens opening.
    15·2 answers
  • Looking at the code below, what happens when this onHit function runs?
    12·2 answers
  • How have cell phones improved our lives​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!