Jump to content
Sign in to follow this  
Henry Olive

Firebird - Sum of total fields from different tables ?

Recommended Posts

I wish everyone a healthy day.
Is there a way get sum of total fields from different tables ?

Something like below

(SELECT SUM(TOTAL) FROM TABLE1) + (SELECT SUM(TOTAL) FROM TABLE2) + (SELECT SUM(TOTAL) FROM TABLE3)

For Example 3 Field's Total Sum RESULT = 12,000.-


Thank You
 

 

Share this post


Link to post
SELECT
(SELECT SUM(a.Total) FROM Table1 a) +
(SELECT SUM(a.Total) FROM Table2 a) +
(SELECT SUM(a.Total) FROM Table3 a) as GrandTotal
FROM RDB$Database

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×