Skip to main content
Version: Latest-3.5

bar

Draw a bar graph like histogram to inspect the data distribution.

Syntax​

bar(size, min, max, width) 

Parameters​

  • size: size of the bar, must be within the [min, max]
  • min: min value of the bar
  • max: max value of the bar
  • width: width of the bar

Example​

MYSQL > select r, bar(r, 0, 10, 20) as x from table(generate_series(0, 10)) as s(r);

0
1 β–“β–“
2 β–“β–“β–“β–“
3 β–“β–“β–“β–“β–“β–“
4 β–“β–“β–“β–“β–“β–“β–“β–“
5 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
6 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
7 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
8 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
9 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
10 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“