Created
July 11, 2016 19:29
-
-
Save Fhernd/185b1eb35b8903df338bd016538c0b5e to your computer and use it in GitHub Desktop.
Uso de DISTINCT para obtener valores únicos de un historial de pagos a empleados. [OrtizOL]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT RateChangeDate, | |
COUNT(Rate) AS 'Contador', | |
COUNT(DISTINCT Rate) AS 'Valores Distintos' | |
FROM HumanResources.EmployeePayHistory | |
WHERE RateChangeDate >= '2003-01-01T00:00:00.000' | |
AND RateChangeDate < '2003-01-10T00:00:00.000' | |
GROUP BY RateChangeDate; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment