+ Start a Discussion

soql to get list of acconts by month since 2016


I want to get list of accounts created from 2016 by months.
What is SOQL query i can use, please ?
as the records are in 30 million, i plan to execute soql by each month
Best Answer chosen by Sandrine
Suraj Tripathi 47Suraj Tripathi 47

Hi Sandrine,

As we know that we have a limit in salesforce to fatch the data by soql query 50,000.

If we have to got more then 50000 data then use Batch Apex class .

Batch Apex your logic will be processed in chunks of anywhere from 1 to 200 records in a batch.

 If you find your Solution then mark this as the best answer.


  Thank you!

  Suraj Tripathi