I wanted to add the following to my SQL query (I use Confluence->Table Transformator): I wanted to output the total number of G1 projects and separately the total number for G2 projects. Can I still add this to my code? Now I only get a 1 for each line, but unfortunately that doesn't give me the total number of G1 or G2. I've been working on it for so long, please help me.
This is my current code :
"
SELECT *, COUNT(*) AS 'Projekte', T1.'Key'
FROM
(SELECT
CASE
WHEN T1.'Labels' LIKE "%G1%"
THEN FORMATWIKI("{cell:bgColor=#00FF00}G1{cell}")
WHEN T1.'Labels' LIKE "%G2%"
THEN FORMATWIKI("{cell:bgColor=#FF0000}G2{cell}")
END AS 'Milestone', 'Key'
FROM T*) T
WHERE T.'Milestone' IS NOT NULL
GROUP BY T.'Milestone', 'Key'
ORDER BY Projekte ASC
"

