If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Top 5 with grouping
I am trying to get the top 5 results for each region. Any help would be
appreciatted, below is my sql thus far. SELECT TOP 5 QryNullConv.AbsError, QryNullConv.DmdUnit, QryNullConv.Loc, QryNullConv.Region FROM QryNullConv; |
#2
|
|||
|
|||
Top 5 with grouping
TOP 5 for the region based on what.- the number of AbsError?
SELECT q.Region, q.AbsError, Q.DmdUnit, Q.Loc FROM qryNullConv as Q WHERE Q.AbsError in ( SELECT TOP 5 absError FROM qryNullConv as T WHERE T.Region = Q.Region ORDER BY absError DESC) -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County .. "AirgasRob" wrote in message news I am trying to get the top 5 results for each region. Any help would be appreciatted, below is my sql thus far. SELECT TOP 5 QryNullConv.AbsError, QryNullConv.DmdUnit, QryNullConv.Loc, QryNullConv.Region FROM QryNullConv; |
Thread Tools | |
Display Modes | |
|
|