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]
3 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]3 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
which of the following statements about servers is correct A. servers are computers on a network that share their resources with
givi [52]
A server can have many definitions, but in this particular case, the answer is A.  
7 0
3 years ago
Read 2 more answers
Power point how to insert diamond symbol
IceJOKER [234]
You got to "insert" and then you go to "shapes" and then you find the symbol you like and you drag and drop it onto the page. Then you can resize to the size and angle you would like it at.
4 0
3 years ago
Can I have help on this
never [62]

the answer is the seconf one


6 0
3 years ago
Read 2 more answers
Which document would most likely be written in an informal style?
Masteriza [31]

Answer:

An advertisement for sportswear

Explanation:

An advertisement for sportswear would most likely be written in an informal style.

6 0
3 years ago
What are the disadvantages of having too many featuresin a language?
AlekseyPX

Answer:

Disadvantage of having too many features in a language is that:

  • There are many functions with same name but perform different function or task so it will create an issue or problem.
  • Features do not duplicate one another as, there are different possible syntax for the same meaning.
  • In a mathematical function, sometimes user function and mathematical variable name collide with language base features so it will create problem.
4 0
3 years ago
Other questions:
  • To change the background color of a page, which tab would you use?
    15·2 answers
  • Which are valid double statements for java? double a = 0; double b = -1.0; double c = -425; double d = 6340; double e = -1.0; do
    12·2 answers
  • Write the definition of a function max that has three int parameters and returns the largest.
    6·2 answers
  • The purpose of​ a/an _________ system is to capture best practice solutions and program them into a set of rules in a software p
    13·1 answer
  • What are the most commonly found items in the trash according to the Municipal Solid Waste report?
    12·2 answers
  • Given the following schedule, show the locks that will occur and the subsequent schedule. Assume that strict 2PL is in effect, w
    13·1 answer
  • What Is the Purpose of a Web Browser? *<br><br>​
    7·2 answers
  • What is polymerization1​
    11·1 answer
  • To excel at these professions, you need to be able to combine an eye for elegant design with a mind that delights in efficient o
    8·1 answer
  • How do most business applications and websites process credit card transactions?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!