I'm looking for a SQL Server function that will let me take an average, excluding outliers. Basically something where:
1, 2, 1, 2, 7
Would average out to 1.5.
I'm going to implement this in a financial analysis Microsoft SQL script.
My query is way too long and complicated to fit here, and it's not something I want to post publicly. AVG
doesn't look like it has an option to exclude outliers per se, though it does include a PARTITION BY
.