Hi,
I'm running into a SQL select query problem. I know how to combine two select queries but now i need to combine 3 more queries.
Normally this is how i do it with two queries
But now i don't know how to merge all these select queries.Code:SELECT color as 'COLOUR', sum((A-B) as 'FIRST' from (select * FROM xx Where user=admin and country=Canada) as aaa group by colour
This is my main SQL query
And then from the result of my main SQL query i would like to run the next queries to calculate my final result "final" and group them by colour . Here i have no idea how to do it.Code:Select * from xx where user=admin and country=Canada
Any help will be appreciated.Code:(select (A-B) as first where car=yes + select (C-D) as second where car=no - select (E) as thrid where car=maybe) as final and group by COLOR
Thank You




Reply With Quote