There are many forests in world,each forest has many trees,each tree has multiple leaves. Draw database schema for the above statement.
Select all leaves for forest id=10. Use Only JOINS.
Please write the query for this.
Regards,
Zuber Kazi
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Zuber KaziPosted Jan 21, 2012, 12:33 AM
Posted Jan 20, 2012, 8:47 AM
f.forestname,t.treename,l.leafname
from
forests f
inner join trees t on f.forestid = t.forestid
inner join leafs l on t.treeid = l.treeid
where f.forestid = 10
Hope this helps.