-- write a SQL query to find the details of those salespeople who come from the 'Paris' City or 'Rome' City.
SELECT * FROM Salesman
Where city='Paris' OR city='Rome';
-- write a SQL query to find the details of those salespeople who come from any of the City 'Paris' or 'Rome'
SELECT * FROM Salesman
Where city IN('Paris','Rome');
-- write a SQL query to find the details of those salespeople who live in cities apart from 'Paris' and 'Rome'.
SELECT * FROM Salesman
Where city NOT IN('Paris','Rome');
-- write a SQL query to find the details of the customers whose ID belongs to any of the values 3007, 3008 and 3009. Return customer_id, cust_name, city, grade, and salesman_id.
SELECT* FROM customer_id
Where customer_id IN (3007,3008,3009);
-- write a SQL query to find the details of salespeople who get the commission in the range from 0.12 to 0.14 (begin and end values are included)
SELECT * FROM salesman WHERE commission BETWEEN 0.12 AND 0.14;
-- write a SQL query to select orders value within a range 500, 4000 (begin and end values are included). Exclude orders amount 948.50 and 1983.43
SELECT * FROM Orders WHERE (purch_amt BETWEEN 500 AND 4000) AND NOT purch_amt IN(948.50,1983.43);
-- write a SQL query to find the details of those salespeople whose name starts with any letter within 'A' and 'L' (not inclusive)
SELECT * FROM Salesman
Where Name Between 'A' AND 'L';
-- write a SQL query to find the details of all salespeople except whose name starts with any letter within 'A' and 'L' (not inclusive)
SELECT * FROM Salesman
WHERE name NOT BETWEEN 'A'AND 'L';
-- From the following table, write a SQL query to find the details of the customers whose name begins with the letter 'B'. Return customer_id, cust_name, city, grade, salesman_id.
SELECT * FROM customer WHERE cust_name LIKE 'B%';
-- write a SQL query to find the details of the customers whose names end with the letter 'n'. Return customer_id, cust_name, city, grade, salesman_id.
SELECT * FROM customer WHERE cust_name LIKE '%n';
-- write a SQL query to find the details of those salespeople whose name starts with ‘N’ and the fourth character is 'l'.
SELECT * FROM Salesman WHERE name Like 'N__l%';
-- write a SQL query to find those rows where col1 contains the escape character underscore ( _ ).
SELECT * FROM Testtable WHERE col1 Like'%/_%'escape '/';
-- write a SQL query to find those rows where col1 does not contain the escape character underscore ( _ )
SELECT * FROM Testtable Where Not col1 Like'%/-%'escape '/';
-- write a SQL query to find those rows where col1 contains the forward slash character ( / )
SELECT *FROM Testtable WHERE col1 Like'%//%' ESCAPE '/';
-- write a SQL query to find those rows where col1 does not contain the forward slash character ( / )
SELECT *FROM Testtable WHERE col1 NOT Like'%//%' ESCAPE '/';
-- From the following table, write a SQL query to find those rows where col1 contains the string ( _/ ).
SELECT * FROM Testtable WHERE col1 Like'%/_//%'ESCAPE '/';
-- write a SQL query to find those rows where col1 does not contain the string ( _/ ).
SELECT * FROM Testtable WHERE col1 NOT like'%/_/%' Escape '/';
-- write a SQL query to find those rows where col1 contains the character percent ( % ).
SELECT * FROM Testtable WHERE col1 Like '%%%'Escape '/';
-- write a SQL query to find those rows where col1 does not contain the character percent ( % )
SELECT * FROM Testtable WHERE col1 NOT like '%/%%'Escape '/';
-- write a SQL query to find all those customers who does not have any grade.
SELECT *FROM customer
WHERE grade IS Null;
-- write a SQL query to find all those customers whose grade value exists.
SELECT * FROM customer WHERE NOT grade IS NULL;
-- write a SQL query to find the employees whose last name begins with the character 'D'
SELECT * FROM emp_details
WHERE emp_lname Like'D%';
--
To embed this project on your website, copy the following code and paste it into your website's HTML: