SQL statement to display the publication ID, publication date, cost, and categor
ID: 3708901 • Letter: S
Question
SQL statement to display the publication ID, publication date, cost, and category of each book planned for publication ID number 5, and include ID and Date as column aliases for the first two columns. SELECT Books.PubID AS ID, Books.PubDate AS [Date], Books.Cost, Books.Category FROM Publisher INNER JOIN Books ON Publisher.PubID=Books.PubID WHERE Books.PubID=5;
Save
SQL statement to display the least expensive retail price book in each book category, and sort the displayed categories in the ascending order. SELECT Min(Books.Retail) AS Lowest, Books.Category FROM Books GROUP BY Books.Category ORDER BY Books.Category DESC;
SQL statement to display the customer number, city of destination, and shipping date for all shipments with order ID above 3, and restrict the output to shipping dates after January 1, 2013. SELECT Orders.CustomerID, City, ShippingDate FROM Orders INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID WHERE (Orders.OrderID>2) AND (Orders.ShippingDate >#01/01/2013#);
INSERT statement to add the following data to the Publisher table:
INSERT ('6','TEXT AND MORE','John Carter','032-100-7777'),
True FalseExplanation / Answer
Question 1 Answer) True
Question 2 Answer) False
Explanation:- To display the result in ascending order we have to use the keyword ASC
Question 3 Answer) False
Explanation:- We have to use TO_DATE function to convert string into date
Question 4 Answer) False
Explanation:- We have to specify the table into which we should insert data like below
INSERT INTO PUBLISHER VALUES('6','TEXT AND MORE','John Carter','032-100-7777'),
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.