CBSE Class 12 Informatics Practices Question 84 of 91

JOINS and SET Operations — Question 20

Back to all questions
20
Question

Question 20

Consider following tables to answer questions 15-20 :

Salesman (salesman_id, name, city, commission ) and

Customer (customer_id, cust_name, city, grade, salesman_id )

Write an SQL query to list all the customers whose salesmen have earned a commission of at least 15%.

Answer
SELECT c.cust_name
FROM Customer c, Salesman s
WHERE c.salesman_id = s.salesman_id
AND commission >= 0.15 ;