-- write a SQL query to find the details of the customers who have a gradevalue above 100. SELECT *FROM customer WHERE grade>100; -- write a SQL query to find all the customers in ‘New York’ city who have a grade value above 100. SELECT * FROM customer WHERE city='New York' AND grade=100; -- write a SQL query to find the customers who belong to either the city ‘New York’ or have a grade above 100 SELECT *FROM customer WHERE city='New York' OR grade>100; -- write a SQL query to find the customers who belong to either the city ‘New York’ or not have a grade above 100 SELECT *FROM customer WHERE city='NEW York' OR NOT garde>100; -- write a SQL query to find those customers who belong to neither the ‘New York’ city nor their grade value exceeds 100 SELECT * FROM customer WHERE NOT(city='NEW YORK'OR grade>100); -- write a SQL query to find details of all order excluding combination of ord_date equal to '2012-09-10' and salesman_id higher than 5005 or purch_amt greater than 1000. SELECT * FROM orders WHERE NOT ((ord_date='2012-09-10'AND salesman_id>5005) OR purch_amt>1000); -- write a SQL query to find the details of those salespeople whose commissions range from 0.10 to0.12. SELECT salesman_id,name,city,commission FROM salesman WHERE (commission > 0.10 AND commission< 0.12); -- write a SQL query to find details of all order where purchase amount less than 200 or excluding combination of order date greater than or equal to '2012-02-10' and customer ID less than 3009. SELECT *from orders WHERE (prchase_amt<200 OR NOT(ord_date>='2012*02-10'AND customer_id <3009)) ; -- write a SQL query to find all orders subject to following conditions. Exclude combination of order date equal to '2012-08-17' or customer ID higher than 3005 and purchase amount less than 1000 SELECT *FROM orders Where NOT ((ord_date='2012-08-17' OR customer_id>3005) AND purch_amt<1000); -- Write a SQL query to display order number, purchase amount, the achieved and 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 "Not achieved %" From orders Where (100*purch amt)/6000>50;
To embed this project on your website, copy the following code and paste it into your website's HTML: