SQL: Using AND operator with a specified condition
SQL Boolean Operator Statement : Exercise-7 with Solution.
Write a SQL statement to display salesman_id, name, city and commission who gets the commission within the range more than 0.10% and less than 0.12%.
Sample table : salesman
Sample Solution :
SELECT salesman_id,name,city,commission FROM salesman WHERE (commission > 0.10 AND commission< 0.12);
Output of the Query:
salesman_id name city commission 5005 Pit Alex London 0.11
Pictorial presentation :
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a SQL statement to display either those orders which are not issued on date 2012-09-10 and issued by the salesman whose ID is 505 and below or those orders which purchase amount is 1000.00 and below.
Next: Write a SQL query to display all orders where purchase amount less than 200 or exclude those orders which order date is on or greater than 10th Feb,2012 and customer id is below 3009.
What is the difficulty level of this exercise?