You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
348 B
SQL
6 lines
348 B
SQL
/*13. Write a query to create a view that shows all matches of customers with salesman such that at least one customer in the
|
|
city of customer served by a salesman in the city of the salesman.*/
|
|
CREATE VIEW citymatch(custcity, salescity)
|
|
AS SELECT DISTINCT a.city, b.city
|
|
FROM customer a, salesman b
|
|
WHERE a.salesman_id = b.salesman_id; |