Quantcast
Channel: Sum of query generated columns - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Lukasz Szozda for Sum of query generated columns

You could use subquery:SELECT the_team, name,result_306 + result_2846 AS total_winsFROM ( SELECT the_team the_team, te.name name, count(CASE WHEN scored > conceded AND opponent = '306' THEN 1 END)...

View Article



Sum of query generated columns

I have this query SELECTthe_team the_team,te.name name,count(CASE WHEN scored > conceded AND opponent = '306'THEN 1 END) result_306,count(CASE WHEN scored > conceded AND opponent = '2846'THEN 1...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images