

Hi Lisa,Opportunity Line Items are children of Opportunities. To get both Opportunity and Opportunity Line Item (or Opportunity Product) information, you'll either need to query from Opportunity Line Items and bring in their parent Opportunity information, or use a subquery on the Opportunity that pulls in Opportunity Line Items.For some examples, see this document: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_query_using.htm⌗sforce_api_calls_soql_relationships_query_usingBecause you're using the developer console to query information, I would query the Opportunity Line Items, and bring in the parent Opp information like so:
The above query will give you an exploded list of all the opportunity line items under any opportunity matching your criteria. Alternatively, you could do something like the following using a subquery, but digging through the Opportunity Line Items in developer console is kind of a pain:SELECT Opportunity.Name, Opportunity.StageName, Opportunity.Substage__c, Opportunity.Closedate, Opportunity.Opportunity_number__c, Opportunity.Navision_Order_Number__c, Opportunity.Installer__r.Name, Opportunity.Payment_Account__r.Name, Opportunity.Payment_Account__r.PaymentAccountNumber__c, Opportunity.Payment_Account__r.Billing_Country__c, Opportunity.Shipping_Country__c, Product2.Name, Opportunity.Payment_Account__r.id, id FROM OpportunityLineItem WHERE Opportunity.Closedate > 2015-01-01 AND Opportunity.Closedate < 2017-01-01 AND Opportunity.StageName != 'Closed Lost' AND Opportunity.StageName != 'Intake' Order By Opportunity.CloseDate Desc, Opportunity.Id
SELECT Name, StageName, Substage__c, Closedate, Opportunity_number__c, Navision_Order_Number__c, Installer__r.Name, Payment_Account__r.Name, Payment_Account__r.PaymentAccountNumber__c, Payment_Account__r.Billing_Country__c, Shipping_Country__c, Payment_Account__r.id, id, (Select Product2.Name From OpportunityLineItems) FROM Opportunity WHERE Closedate > 2015-01-01 AND Closedate < 2017-01-01 AND StageName != 'Closed Lost' AND StageName != 'Intake'