I am working in an org that has multi currency enabled, and am trying to query out the biggest opportunities per Account, where the opp is over 10,000 GBP or USD.
I was hoping to use something like this:
Select AccountId, MAX(Amount) FROM Opportunity WHERE Amount > USD10000 OR Amount > GBP10000 and CloseDate = LAST_N_YEARS:3 GROUP BY AccountId
If I query without specifying a currency, then the SOQL results are returned converting the amount to my locale. So I get USD 10,000 opportunities returned with the amount in GBP (which is around GBP£7k). Reason I need the true amount values, is I then want to loop over the values in apex to update some records.