Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2Questions with SQL using summary queries Administrators AdminlD EmailAddress Pa

ID: 3750099 • Letter: 2

Question

2Questions with SQL using summary queries

Administrators AdminlD EmailAddress Password FirstName LastName Orderltems ItemID OrderID ProductiD temPrice DiscountAmount Products ProductiD CategoryID ProductName Description ListPrice DiscountPercent DateAdded Orders Addresses OrderlD CustomerlD OrderDate ShipAmount TaxAmount ShipDate ShipAddressID AddresSID CustomeriD Line1 Line2 Customers CustomerID EmailAddress Password FirstName State ZipCode ShippingAddressID BillingAddressID Categories CategoryID CategoryName CardNumber CardExpires BillingAddressID

Explanation / Answer

Answer:

select ProductName, OrderItems.Quantity * Products.ListPrice as Total from Products, OrderItems, Products;

select EmailAddress, distinct(ProductName) from Customers, Products, OrderItems, Orders where Products.ProductID = OrderItems.ProductID,
OrderItems.OrderId = Orders.OrderID,
Orders.CustomerID = Customers.CustomerID
group by EmailAddress having count(OrderItems.OrderID) > 1;
  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote