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 BillingAddressIDExplanation / 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;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.