I have an SSRS report that run every day calculates employees interaction with sales sent report in excel.it will generate report how many times sales has been resolved by employees in a format of [NAME, STATUS,USERID. EDITDATE ]. what i am trying to achieve is i wont only to receive 2% of the entire report daily for all username (Employee). EXAMPLE if JOHN DOE oversaw 1000 sales today i wont only 2% of what he adjudicated.
WITH CTE AS (
SELECT *,ROW_NUMBER() OVER (PARTITION BY [USERID] ORDER BY RAND()) AS Rn
FROM yourTable
)
SELECT * FROM CTE WHERE Rn = 2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.