SELECT projectteam_id, SUM( value *2 * IF( statistic_id =3, 1, 0 ) ) AS 2er , SUM( value *5 * IF( statistic_id =4, 1, 0 ) ) AS 5er , SUM( value *10 * IF( statistic_id =7, 1, 0 ) ) AS 10er , SUM( value *20 * IF( statistic_id =8, 1, 0 ) ) AS 20er , SUM( value *25 * IF( statistic_id =9, 1, 0 ) ) AS 5er
FROM jos_joomleague_match_statistic
GROUP BY projectteam_id
Geschafft, Danke fürs auf den richtigen Weg führen!