Sqlserver
 sql >> Base de Dados >  >> RDS >> Sqlserver

MSSQL Row_Number () sobre (ordenar por) no MySql

set @row:=0;
SELECT 
  @row:[email protected]+1 as row_numer,
  NAME, 
  SUM(donationvalue) as total 
FROM tbl_pdm2k10_Donations
GROUP BY NAME
ORDER BY total desc