We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
for sql server users, there is a built in function that helps you with percentiles. percentile_disc is used to find a row in a set of records which is the nth percentile of that set. The median is the 50th percentile of any set.
the syntax is: PERCENTILE_DISC (percentile you are looking for) WITHIN GROUP (the column in which you need to find your percentile) OVER (you can, but arent required to, PARTITION BY another column, but you can't use an ORDER BY since that is taken care of in the WITHIN GROUP clause)
Weather Observation Station 20
You are viewing a single comment's thread. Return to all comments →
for sql server users, there is a built in function that helps you with percentiles. percentile_disc is used to find a row in a set of records which is the nth percentile of that set. The median is the 50th percentile of any set.
the syntax is: PERCENTILE_DISC (percentile you are looking for) WITHIN GROUP (the column in which you need to find your percentile) OVER (you can, but arent required to, PARTITION BY another column, but you can't use an ORDER BY since that is taken care of in the WITHIN GROUP clause)