You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
339 B
SQL
7 lines
339 B
SQL
/*Write a SQL query to display order number, purchase amount, achived, the unachieved percentage for those order
|
|
which exceeds the 50% of the target value of 6000. */
|
|
SELECT ord_no,purch_amt,
|
|
(100*purch_amt)/6000 AS "Achieved %",
|
|
(100*(6000-purch_amt)/6000) AS "Unachieved %"
|
|
FROM orders
|
|
WHERE (100*purch_amt)/6000>50; |