Q:

From the following table, write a SQL query to find the items whose prices are higher than or equal to $250. Order the result by product price in descending

0

From the following table, write a SQL query to find the items whose prices are higher than or equal to $250. Order the result by product price in descending, then product name in ascending. Return pro_name and pro_price.

 PRO_ID PRO_NAME                       PRO_PRICE    PRO_COM
------- ------------------------- -------------- ----------
    101 Mother Board                    3200.00         15
    102 Key Board                        450.00         16
    103 ZIP drive                        250.00         14
    104 Speaker                          550.00         16
    105 Monitor                         5000.00         11
    106 DVD drive                        900.00         12
    107 CD drive                         800.00         12
    108 Printer                         2600.00         13
    109 Refill cartridge                 350.00         13
    110 Mouse                            250.00         12

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

SELECT pro_name, pro_price 
     FROM item_mast
    WHERE pro_price >= 250
 ORDER BY pro_price DESC, pro_name;

Output of the Query:

pro_name	   pro_price
Monitor	        5000.00
Mother Board	3200.00
Printer	        2600.00
DVD drive	     900.00
CD drive	     800.00
Speaker	         550.00
Key Board	     450.00
Refill cartridge 350.00
Mouse	         250.00
ZIP drive	     250.00

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now