function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amol SolankiAmol Solanki 

SQOL get mostly hit recoeds.

Hi Friends ,

I need a approach to fetch 10 mostly/frequently hit records in an object.has anyone implemented this.if so please revert back.
NOTE: I just need a approach or if anyone has the implemented code then it would be like cherry on top of the cake.
Thanks for reading this post and helping me out.
Arunkumar RArunkumar R
Hi Amol,

You can use the below example queries,

Query to Retrieve Recently viewed records, 
SELECT Id, Name,LastViewedDate FROM Account WHERE LastViewedDate !=null ORDER BY LastViewedDate DESC
Query to Retrieve Recently Modified records, 
SELECT Id, Name,LastModifiedDate FROM account ORDER BY LastModifiedDate DESC