How can you write a SOQL (Salesforce query language) query to find an opportunity, given its parent account's account id?
I want to do something like this (doesn't work though):
SELECT Id, Name FROM Opportunity WHERE AccountId = '003D000000f0gfH'
Your query is fine, but you don't have an AccountId, 003 prefixed ids are for contacts.