Skip to content

Instantly share code, notes, and snippets.

Sina Bahram sinabahram

Block or report user

Report or block sinabahram

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sinabahram
sinabahram / gist:1f59668c849c78d138445c266f1032c0
Created Apr 4, 2017
SQL to Return Rows within 95th Percentile
View gist:1f59668c849c78d138445c266f1032c0
SELECT CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(field_name ORDER BY field_name SEPARATOR ','),  ',', 95/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS `95th Per` FROM table_name;
You can’t perform that action at this time.