Subject Firebird Inner Join And SubSelect
Author martinthrelly
hi i am trying to run the following sql within IBExpert but it wont
run saying "invalid token Select". i realise this may be a simple
error i am making but could somebody please point me out why i cannot
join a summed amount like this. thanks.

select
v.vatcode,
d.disbs,
v.vatvalue,
v.netvalue
from vattransactions v
inner join (
select
sum(netvalue) as disbs
from disbursements) d on v.transno = d.transno
where v.vatquarter = 20
and v.inputoutput = 'O'
order by
v.vatcode