SQL query for getting count on same table using left outer join
- by Sasi
Hi all,
I have a table from which i need to get the count grouped on two columns.
the table has two columns one datetime column and another one is success value(-1,1,0)
What i am looking for is something like this...
count of success value for each month
month----success-----count
11------- -1 ------- 50
11------- 1 --------- 50
11------- 0 ------- 50
12------- -1 ------- 50
12------- 1 ------- 50
12------- 0 ------- 50
if there is no success value for a month then the count should be null or zero.
I have tried with left outer join as well but of no use it gives the count incorrectly.
Thanks in advance
Sasi