I am trying to write a query that would return two COUNT values. Basically, I have a table that contains JOBGROUP, JOBNAMES and STATUS. There are many JOBNAMES for each JOBGROUP. The status field can either be SUCCESS or NONE.
So the table looks like this:
JOBGROUP JOBNAME STATUS
A A1 NONE
A A2 NONE
A A3 SUCCESS
B B1 NONE
B B2 NONE
B B3 NONE
What I want to return is the following:
JOBGROUP TOTAL_JOBS TOTAL_SUCCESS
A 3 1
B 3 0
Any Ideas? Sorry if this is basic, but I'm novice at SQL.
So the table looks like this:
JOBGROUP JOBNAME STATUS
A A1 NONE
A A2 NONE
A A3 SUCCESS
B B1 NONE
B B2 NONE
B B3 NONE
What I want to return is the following:
JOBGROUP TOTAL_JOBS TOTAL_SUCCESS
A 3 1
B 3 0
Any Ideas? Sorry if this is basic, but I'm novice at SQL.