R
rfuscjr via AccessMonster.com
I am close but can not get my query right.
SELECT
junk2.FiscalYear,
junk2.DEPARTMENT_NAME,
junk2.Employee_Number,
junk2.CountOfRecords,
(Select Count(*) from junk Where [countofRecords] > junk2.[countofRecords]+1
AS Expr1
FROM JUNK AS junk2
GROUP BY junk2.FiscalYear,
junk2.DEPARTMENT_NAME,
junk2.Employee_NUMBER,
junk2.CountOfRecords;
This essentially ranks ALL rowss based on CountofRecords.
So I can see which row has the most records, the second most, third most etc
etc.
What I need is to see this by Fiscal Year then Dept. In other works rank the
record counts base on year and dept therein. Its ranking them for ALL years
ALL Depts right now.
Ideas?
SELECT
junk2.FiscalYear,
junk2.DEPARTMENT_NAME,
junk2.Employee_Number,
junk2.CountOfRecords,
(Select Count(*) from junk Where [countofRecords] > junk2.[countofRecords]+1
AS Expr1
FROM JUNK AS junk2
GROUP BY junk2.FiscalYear,
junk2.DEPARTMENT_NAME,
junk2.Employee_NUMBER,
junk2.CountOfRecords;
This essentially ranks ALL rowss based on CountofRecords.
So I can see which row has the most records, the second most, third most etc
etc.
What I need is to see this by Fiscal Year then Dept. In other works rank the
record counts base on year and dept therein. Its ranking them for ALL years
ALL Depts right now.
Ideas?