Thanks! That helped a lot. How would I access the inner soql statement from Visualforce? I can access the outer by calling the query from my custom controller, but when I try to do something like {!Opp.UnitPrice}, I get an error stating "Could not resolve field 'UnitPrice'..."
Are you trying to get opportunity line items in opportunity as inner query.
Then try this query
Select Amount,CloseDate,Name, (Select PricebookEntry.Product2Id, TotalPrice, UnitPrice, ListPrice From OpportunityLineItems) From Opportunity
Thanks
Anil.B
If you want to dispaly them in viusal force page
try these code:
Thanks
Anil.B