In 2 level you mean a parent and children, you can do this in a
single query, although it contains a subquery that counts as another
SOQL query for governor limits purposes.
In 3 levels you need to use two
queries, one of which would contain a subquery.
single query, although it contains a subquery that counts as another
SOQL query for governor limits purposes.
In 3 levels you need to use two
queries, one of which would contain a subquery.
Subquery also counts against Salesforce governor limit.
Cheers!!!