Try this
SELECT [name],[phone]
FROM (
SELECT *,Row_Number() Over (Partition By phone Order By (Select Null)) AS RN
FROM Table1
) AS T
Where RN = 1
OFFSET n ROWS
You can replace n with your custom values...
Try this
SELECT [name],[phone]
FROM (
SELECT *,Row_Number() Over (Partition By phone Order By (Select Null)) AS RN
FROM Table1
) AS T
Where RN = 1
OFFSET n ROWS
You can replace n with your custom values...
Try this
SELECT MAX(name), phone FROM <TableName> group by phone
EDIT: for offset
SELECT MAX(name), phone FROM <TableName> group by phone
order by phone offset 10 rows
FETCH NEXT 5 ROWS ONLY;
Check this for further details.
Try this
SELECT name,
phone
FROM (SELECT *,
Row_number()
OVER(
partition BY phone
ORDER BY name) row_num -- or you can have order by (select null)
FROM table1) t
WHERE row_num = 1