sql how to have the total rows number in this case nawfer

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

in this select  
$query="SELECT *  
FROM table1
(CASE WHEN column2 = 100 THEN 1 ELSE 0 END + CASE WHEN column3='Y' THEN
2 ELSE 0 END) ASC, column1 ASC, column2 ASC;

how to have
a) the numeration for every row;
b) the total number of all the rows  
c) the total number of column2 = 100 rows
d) the total number of column3='Y'   rows    ?

Site Timeline