From the following tables, write a SQL query to find those customers where each customer has a grade and served by at least a salesperson
- برمجة سي كيو ال sql
- 2021-09-01
- mhanasmh00489829403
الأجوبة
Sample Solution:
SELECT customer.cust_name AS "Customer",
customer.grade AS "Grade"
FROM orders, salesman, customer
WHERE orders.customer_id = customer.customer_id
AND orders.salesman_id = salesman.salesman_id
AND salesman.city IS NOT NULL
AND customer.grade IS NOT NULL;
Output of the query:
Customer Grade Nick Rimando 100 Geoff Cameron 100 Brad Davis 200 Nick Rimando 100 Fabian Johnson 300 Geoff Cameron 100 Jozy Altidor 200 Nick Rimando 100 Graham Zusi 200 Graham Zusi 200 Julian Green 300
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال