You need to sign in to do that
Don't have an account?

SOQL Query on Account Opportunity to get the data from 2010 to 2016
HI
Can any one help me out in getting total count of opportunites between this years 2010 to 2016 which also needs accountname.
Thanks in Advance
Can any one help me out in getting total count of opportunites between this years 2010 to 2016 which also needs accountname.
Thanks in Advance
select id, Name, (Select id, Accountid, Createddate, stageName From Opportunities) From Account where stageName = '6 - Closed Won' AND createdDate > 2010-01-01T00:00:00Z and createdDate < 2016-01-31T23:59:59Z
Try this query: Thanks,
Dhanya
All Answers
Try this query Thanks,
Dhanya
Thanks for the quick response,i also nee to query the tageName = '6 - Closed Won' with the which includes YY-MM-DD in the query,i tried replacing in above query its not workig,can you help me out with the same.
Try this query: Thanks,
Dhanya
You can try this one. To get the count, you must have to assign it to list and then get the list size, it will show total number of records otherwise you have to write dynamic SOQL to get the total count.
Thanks!
Adeel