197k views
0 votes
List all printer’s maker, model and price. Display the highest price on the top (Hint: order by) write a sql query?

User TalkLittle
by
7.7k points

1 Answer

2 votes

Final answer:

To list all printer's maker, model, and price in a SQL query, use the SELECT statement with the ORDER BY clause, ordering by price in descending order.

Step-by-step explanation:

To list all printer's maker, model, and price in a SQL query, you can use the SELECT statement along with the ORDER BY clause. Assuming you have a table named 'printers' with columns 'maker', 'model', and 'price', the query would look like this:

SELECT maker, model, price
FROM printers
ORDER BY price DESC;

This query will retrieve the maker, model, and price from the 'printers' table and order the results in descending order based on the price, displaying the highest price on top.

User Ben Kilah
by
8.5k points