LIMIT clause is used to limit the number of rows returned by a SOQL query. The maximum number of records that should be fetched is specified in the Limit clause. The
LIMIT clause is optional, but it is highly recommended to use
Example #1: Find the first 50 clinics in Florida ordered by their name.
You can also apply a limit on SOQL queries containing group by clause. In that case only the first few rows of aggregated records are returned.
Example #2: Find the top 10 clinics with maximum revenue from booking amount.