How to Make a Box-and-Whisker Plot in SQL

Flowing Data’s Nathan Yau does a great job of introducing box plots. As he notes, box plots typically graph six data points:

  • The lowest value, excluding outliers
  • The first quartile (this is the 25th percentile, or median of all the numbers below the median)
  • The median value (equivalent to the 50th percentile)
  • The third quartile (this is the 75th percentile, or median of all the numbers above the median)
  • The highest value, excluding outliers
  • Outliers