I have a SQL statement thats basically the following
select * from table group by A Having A = "Something"
Problem is I need to display all records for B that are under 7
select Count(A) as Count from table group by A,B Having A= "Something" and B <= 7
But if I do it this way it will group all records by B.
Count = 1 / A = Something / B = 1
Count = 1 / A = Something / B = 2
Count = 1 / A = Something / B = 3
I need to have it where it groups everything together in one record.
Count = 3 / A = Something
If anyone could help me with a way to do this it would be greatly appreciated. Thanks
select * from table group by A Having A = "Something"
Problem is I need to display all records for B that are under 7
select Count(A) as Count from table group by A,B Having A= "Something" and B <= 7
But if I do it this way it will group all records by B.
Count = 1 / A = Something / B = 1
Count = 1 / A = Something / B = 2
Count = 1 / A = Something / B = 3
I need to have it where it groups everything together in one record.
Count = 3 / A = Something
If anyone could help me with a way to do this it would be greatly appreciated. Thanks