SUNIL GUTTA

SUNIL GUTTA

  • NA
  • 1k
  • 385.2k

queries help

Feb 14 2014 1:36 AM
Hi
 

1.Write a SeLECT statement that returns these columns;

The counts of the number of orders in the Orders table

The sum of the TaxAmount columns in the Ordeers table.

---------------------------------------------------------------------------

2.Write a SELECT statement that returns one row for each customer that has orders with these columns.

The EmailAddress column from the customer table.

The sum of the item price in the OrderItems table multiplied by the quantity in the OrderItems table

The sum of the discount amount column in the OrderItem table multipled by the quantity in the OrderItems Table

----------------------------------------------------------------------------------------------------------------------------------------------------

3.Write a SELECT statement that answers this question: Which customers have ordered more that one product? Return columns:

The email address from customers table

The count of distinct products d from the customer's orders

Regards 

Answers (4)