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(
I think the most robust way is to sort the list into order and then exclude the top and bottom extremes. For a hundred values, you would sort ascending and take the first 95 PERCENT, then sort descending and take the first 90 PERCENT.