For some people it might look very simple, but I just simply can\'t get it.
I have multiple MS-SQL SELECT queries from the same table over and over:
You can use a GROUP BY Page
SELECT
Page
, COUNT(Page) as "nb"
FROM someTable
GROUP BY Page
You can also do a GROUP BY CASE...
SELECT
CASE
WHEN Page LIKE '%AEC%' THEN "AEC"
WHEN Page LIKE '%TOL%' THEN "TOL"
ELSE ""
END AS "type"
, count(Page) as "nb"
FROM someTable
GROUP BY type
You can also COUNT IF
SELECT
COUNT(IF(Page LIKE '%AEC%', 1, NULL) THEN "AEC"
, COUNT(IF(Page LIKE '%TOL%', 1, NULL) THEN "TOL"
FROM someTable