SQL Uteis

Criar uma coluna que equivale a um número sequencial de registro:

SELECT

ROW_NUMBER() OVER(ORDER BY age) AS RowNumber

,count(*) AS usercount

FROM Users

GROUP BY age