By default, all results that satisfy the conditions specified in the SQL statement are returned. However, this may not always be what we want, as sometimes we only want to retrieve a subset of records.
In MySQL, this is accomplished using the LIMIT keyword.
[SQL Statement 1]
where [N] is the number of records to be returned. Please note that the ORDER BY clause is usually included in the SQL statement.
This table include the details regarding the store details country wise.
SELECT Store_Name, Sales, Txn_Date
ORDER BY Sales DESC
In this query, we have restricted the details to be shown by only to the level of two rows.