Solution for this SQL query?
- by homeWorkBoy
Suppose you have these tables:
Table Name: Salesman
Fields: S_ID(Primary Key), Name
Table Name: Region_1
Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales
Table Name: Region_2
Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales
Table Name: Region_3
Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales
Table Name: Region_4
Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales
Query 1: Find out total of sales of each salesman in all the regions.
Query 2: Find out total of sales of a particual salesman in all the regions. (if the first one is solved I think this will be easy. :-) )