Question : SQL Query:   How to sum the result of two queries?

Hi experts!


I wonder whether I may sum of three  different queries as below:

( SELECT  * from  R Table A)  +  ( (Select * from Table B) +  (Select * from Table C);

Thanks!

Answer : SQL Query:   How to sum the result of two queries?

oops ... SELECT CONCAT
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
For sum of numeric
 
SELECT  SUM(num_val1) from  R Table A where xxx
 +  Select SUM(num_valx)  from Table B where yyy
 +  Select  SUM(num_valeee) from Table C where rrr;
 
for sum of char values
 
SELECT CONCAT(SELECT  SUM(char_val1) from  R Table A where xxx ,
   Select SUM(char_valx)  from Table B where yyy,
   Select  SUM(char_valeee) from Table C where rrr
);
Open in New Window Select All
Random Solutions  
 
programming4us programming4us