Viewing 2 posts - 1 through 2 (of 2 total)
You might be able to get away with a self-join on TableA, e.g.:
SELECT
a.Col1 AS colA,
a.Col2 + ' ** '
...
June 28, 2008 at 4:32 am
#835738
Probably easiest to use a subquery to get the top 5 first, then average the result:
SELECT AVG( col1 )
FROM ( SELECT TOP 5 col1 FROM #test WHERE status...
June 28, 2008 at 4:07 am
#835737