I\'m creating a report comparing total time and volume across units. Here a simplification of the query I\'m using at the moment:
SELECT m.Unit, COUNT(
One way would be to exclude the outliers with a not in clause:
not in
where m.ID not in ( select top 5 percent ID from main_table order by TimeInMinutes desc )
And another not in clause for the bottom five percent.