Help needed two sql questions Schema: Administrators AdminlD EmailAddress Passwo
ID: 3754329 • Letter: H
Question
Help needed two sql questions
Schema:
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
If you have any doubts, please give me comment...
-- 3)
SELECT ProductName, COUNT(DISTINCT DiscountPercent)
FROM Products
GROUP BY ProductName;
-- 4)
SELECT CONCAT(FirstName,' ', LastName) FullName, EmailAddress, OrderID, OrderDate
FROM Customers C, Orders O
WHERE C.CustomerID = O.CustomerID AND O.OrderDate = (
SELECT MIN(OrderDate)
FROM Orders
WHERE C.CustomerID = CustomerID
);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.