php - Get count of multiple condition -
My question is that I want to count three situations in the same query. I know that I can do it with running multiple queries but the problem is that I need it in a query
my query that I've tried
SELECT COUNT (if (AD2, Da, 0) ASD2, CAD (IF (D & T, 1, DR, 0)) from SAD 3 as TV and its result
4 4 4 but expected result
2 1 0 da column
3 2 1 3
SELECT SUM (if (RR & lt; 3, 1, 0)) da 1, sm (i.f. Lt; 2, 1, 0)) AS D2, SM (IF (RR & TT1, 1, 0)) TV to ASD3;
Comments
Post a Comment