From the following tables, create a view that shows all matches of customers with salesperson such that at least one customer in the city of customer served by a salesperson in the city of the salesperson
- برمجة سي كيو ال sql
- 2021-09-02
- mhanasmh00489829403
الأجوبة
CREATE VIEW citymatch(custcity, salescity)
AS SELECT DISTINCT a.city, b.city
FROM customer a, salesman b
WHERE a.salesman_id = b.salesman_id;
output:
sqlpractice=# SELECT * sqlpractice-# FROM citymatch; custcity | salescity ------------+----------- Seattle | Paris Moscow | Rome New York | New York NC | Paris | Paris California | Paris Berlin | London | Paris London | London Dallas | New York (10 rows)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال