-
-
Save parzibyte/a8e7771ec9ebd60bbaf1ff057cee0a54 to your computer and use it in GitHub Desktop.
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
/*La suma de las ventas hechas por cada empleado, y agrupadas por año*/ | |
select pp.FirstName, sum(SalesQuota) as total_vendido, | |
year(QuotaDate) as año | |
from Sales.SalesPersonQuotaHistory qh | |
inner join Person.Person pp | |
on qh.BusinessEntityID = pp.BusinessEntityID | |
group by pp.BusinessEntityID, year(QuotaDate), pp.FirstName | |
order by pp.BusinessEntityID; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment