misterunknown: 2 sql Abfragen kombinieren

Beitrag lesen

Moin,

SELECT  
     A.projectteam_id  
     , SUM( A.value*2 ) AS 2er  
     , SUM( B.value*5 ) AS 5er  
FROM jos_joomleague_match_statistic AS A  
JOIN jos_joomleague_match_statistic AS B ON  
     B.projectteam_id = A.projectteam_id  
     AND B.statistic_id = 4  
WHERE statistic_id = 3  
GROUP BY projectteam_id  
LIMIT 0 , 30

(ungetestet)

Grüße Marco

--
Ich spreche Spaghetticode - fließend.