Solution for this SQL query?

Posted by homeWorkBoy on Stack Overflow See other posts from Stack Overflow or by homeWorkBoy
Published on 2010-04-05T17:11:38Z Indexed on 2010/04/05 17:23 UTC
Read the original article Hit count: 144

Filed under:
|
|

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. :-) )

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql