> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# bar

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

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

## Syntax

```SQL theme={null}
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

```sql theme={null}
select r, bar(r, 0, 10, 20) as x from table(generate_series(0, 10)) as s(r);
```

```plaintext theme={null}
0	
1	▓▓
2	▓▓▓▓
3	▓▓▓▓▓▓
4	▓▓▓▓▓▓▓▓
5	▓▓▓▓▓▓▓▓▓▓
6	▓▓▓▓▓▓▓▓▓▓▓▓
7	▓▓▓▓▓▓▓▓▓▓▓▓▓▓
8	▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
9	▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
10	▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.