|
-
how to write SQl query for the given problem below with a self join
I was jus wondering how to write an sql query for retrieving the following
data:
Table columns... employee name, ID, employee grade, type of job pursuing.
(The "type of job" field can take one out of 3 predefined values and is non
null)- primary key of the table is employee ID
Question: I want to know the no. of each type of job pursued by employees of
each grade
Output required... employee grade, No. of type 1 jobs pursued, no. of type 2
jobs pursued, no. of type 3 jobs pursued.
regds
Raj
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|