E
Eric Nelson
Please help this poor novice querier...
Tables of interest are
tFam (famID, name, etc...)
tJournal(jID, famID, ..., charge, credit)
How do I write a query to return families with nonzero
balance, and that balance?
select name, (sum(charge)-sum(credit) as balance)
from (tFram join tJournal on
tFam.famID=tJournal.famID)
where balance <> 0
The puzzling bit is how to get the sums to work.
Thanks in advance for help.
Tables of interest are
tFam (famID, name, etc...)
tJournal(jID, famID, ..., charge, credit)
How do I write a query to return families with nonzero
balance, and that balance?
select name, (sum(charge)-sum(credit) as balance)
from (tFram join tJournal on
tFam.famID=tJournal.famID)
where balance <> 0
The puzzling bit is how to get the sums to work.
Thanks in advance for help.