Write a query that displays all the fields in the ORDERS table Write a query tha
ID: 3919495 • Letter: W
Question
Write a query that displays all the fields in the ORDERS table
Write a query that displays the title and cost of books in the BOOKS table.
Write a query that displays the title and category of books in the BOOKS table. Use the column headings Book Title for the title field and Book Category for the category field.
Write a query that displays all the cities in the customers table, but lists each city only once.
Write a query that displays the title of each book, the retail price, the wholesale cost, and the profit margin. Calculate profit by subtracting the wholesale cost column from the retail price column.
Explanation / Answer
1. SELECT * FROM ORDERS
2. SELECT title, cost FROM BOOKS
3. SELECT title as Book Title, category as Book Category FROM BOOKS
4. SELECT DISTINCT city FROM Customers
5. SELECT title, retail_price, wholesale_cost, retail_price - wholesale_cost as profit margin FROM Books.
**Comment for any further queries or any changes required.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.