Check out example codes for "rownum in sql". It will help you in understanding the concepts better.

Code Example 1

SELECT ROWNUM, a.*
FROM (SELECT customers.*
      FROM customers
      WHERE customer_id > 4500
      ORDER BY last_name) a;

Code Example 2

SELECT MAX(column_name)

FROM table_name

WHERE condition;

Code Example 3

SELECT *
FROM table
WHERE condition
GROUP BY expression
HAVING condition
{ UNION | INTERSECT | EXCEPT }
ORDER BY expression
LIMIT count
OFFSET start

Code Example 4

Syntax:
SELECT TOP number|percent column_name(s)
FROM table_name
WHERE condition;

Example:
SELECT TOP 3 * FROM Customers;

Code Example 5

SELECT TOP 1000 *
FROM Customer;

Code Example 6

USE AdventureWorks2012;  
GO  
SELECT FirstName, LastName, TerritoryName, ROUND(SalesYTD,2,1) AS SalesYTD,  
ROW_NUMBER() OVER(PARTITION BY TerritoryName ORDER BY SalesYTD DESC) 
  AS Row  
FROM Sales.vSalesPerson  
WHERE TerritoryName IS NOT NULL AND SalesYTD <> 0  
ORDER BY TerritoryName;

Learn ReactJs, React Native from akashmittal.com