Topic: two tables and one result

I have Two Tables
TableA
empoees
money_earn


TableB
electicity


The TableA  has the names of the employees and how much they get every month
in TableB how much I must pay for electricity

I have a budget of 1000 Euro

So I like to  now how much I have in the end of the month in my pocket
budget=100 -money for employees  -electricity

How can I write it to get the result?

Thank you in advance

Re: two tables and one result

Not sure, but try this SQL query:

SELECT 
100-TOTAL(money_earn) - (SELECT TOTAL(TableB.electicity) FROM TableB)
FROM TableA
Dmitry.