7 lines
345 B
MySQL
7 lines
345 B
MySQL
|
/*Write a SQL statement to make a cartesian product between salesman and customer i.e. each salesman will appear for all
|
||
|
customer and vice versa for those salesmen who belongs to a city and the customers who must have a grade.*/
|
||
|
SELECT *
|
||
|
FROM salesman a
|
||
|
CROSS JOIN customer b
|
||
|
WHERE a.city IS NOT NULL
|
||
|
AND b.grade IS NOT NULL;
|