Subject Re: [firebird-support] How do I write this query
Author Magnus Titho
Grant Brown wrote:

> ie all 3 tables are related
>
> I need to find all records in Table A where the record in Table C = a value
>

select t1.*
from tablea t1
join tableb t2 on t2.foreignkey = t1.id
join tablec t3 on t3.foreignkey = t2.id
where t3.somefield = samevalue




Magnus