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
mrs_skeptik [129]
4 years ago
15

1. Create a view named customer_addresses that shows the shipping and billing addresses for each customer.

Computers and Technology
1 answer:
Verdich [7]4 years ago
5 0

Answer:

Answer given below

Explanation:

1.

CREATE VIEW CustomerAddresses AS

SELECT custo. CustomerID, EmailAddress , LastName ,FirstName,

bill.Line1 AS BillLine1, bill.Line2 AS BillLine2, bill.City AS BillCity, bill.State AS BillState, bill.ZipCode AS BillZip,

ship.Line1 AS ShipLine1, ship.Line2 AS ShipLine2, ship.City AS ShipCity, ship.State AS ShipState, ship.ZipCode AS ShipZip

FROM Customers custo , Addresses ship , Addresses bill

WHERE custo. BillingAddressID= bill.AddressID AND custo.ShippingAddressID= ship. AddressID;

2.

SELECT CustomerID, LastName, FirstName, BillLine1 FROM CustomerAddresses;

3.

CREATE VIEW OrderItemProducts

AS

SELECT Orders.OrderID, OrderDate, TaxAmount, ShipDate,

ItemPrice, DiscountAmount, (ItemPrice- DiscountAmount) AS FinalPrice,

Quantity, and (Quantity * (ItemPrice-DiscountAmount)) AS ItemTotal,

ProductName FROM

Orders, OrderItems, Products

WHERE

Orders.OrderID = OrderItems.OrderID AND

OrderItems.ProductID = Products. ProductID;

4.

CREATE VIEW ProductSummary

AS

SELECT distinct

ProductName, COUNT(OrderID) AS OrderCount, SUM(ItemTotal) AS OrderTotal

FROM

OrderItemProducts

GROUP BY ProductName;

5.

SELECT ProductName, OrderTotal

FROM ProductSummary P

WHERE 5> (select count(*) FROM ProductSummary S

WHERE P.OrderTotal<S.OrderTotal)

ORDER BY OrderTotal;

You might be interested in
K
ollegr [7]
True??????????????????????????
7 0
4 years ago
Read 2 more answers
PLEASEEEE HELPPP
zavuch27 [327]
<span>C. real-time operating system</span>
6 0
3 years ago
What is computer virus​
IRINA_888 [86]

Answer:

A type of malicious code or program written to alter the way a computer operates and is designed to spread from one computer to another.

Once a virus has successfully attached to a program, file, or document, the virus will lie dormant until circumstances cause the computer or device to execute its code. In order for a virus to infect your computer, you have to run the infected program, which in turn causes the virus code to be executed.

8 0
3 years ago
Read 2 more answers
Which of the following is the fastest processor
Nookie1986 [14]
Usually a Xeon is the fastest. Matters what time it was built and the chipset. If its old, the i7 is faster.
6 0
3 years ago
A web crawler uses a search _______ to traverse the web.​
aliina [53]
<span>A web crawler uses a search algorithm to traverse the web.
</span>The web crawler is responsible for the process of browsing the net. It systematically browses the World Wide Web<span> by looking at the keywords in the pages, the kind of content each page has and the links, and then return this information to the search engine.</span>
The process is called Web crawling or spidering.
7 0
4 years ago
Other questions:
  • An employee wants to create a fake employee identification number as part of a fraud scheme. Which of the following controls wou
    15·1 answer
  • Alfred, a software programmer at Gamma Inc., develops a program that spreads Trojan viruses to the organization’s network. When
    5·1 answer
  • In which section of a document would you include image acknowledgments for the images used ?
    8·2 answers
  • Given a string, return a version without the first and last char, so "Hello" yields "ell". The string length will be at least 2.
    13·1 answer
  • (6 pts) Write a bash shell script called 08-numMajors that will do the following: i. Read data from a class enrollment file that
    10·1 answer
  • The Electronic Communications Privacy Act requires an investigator to have a wiretap order to acquire ___________ information fr
    8·1 answer
  • Which of these examples demonstrate portfolio income?
    13·2 answers
  • Name at least three classes to which each of these objects might belong:
    10·1 answer
  • 9) Which date is assigned the serial number of 1?
    10·2 answers
  • Which hardware component interprets and carries out the instructions contained in the software.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!