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
use AdventureWorks2012 | |
go | |
WITH Sales_CTE | |
AS | |
( | |
SELECT SalesPersonID, COUNT(*) as JML_ORDER | |
FROM Sales.SalesOrderHeader | |
WHERE SalesPersonID IS NOT NULL | |
GROUP BY SalesPersonID | |
) | |
SELECT AVG(JML_ORDER) AS "Average Sales Per Person" | |
FROM Sales_CTE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment