Skip to content

Commit

Permalink
Update aggregate-histogram.md
Browse files Browse the repository at this point in the history
  • Loading branch information
soyeric128 committed Jan 21, 2025
1 parent 1ab89c7 commit 07f23b7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Generates a data distribution histogram using an "equal height" bucketing strate
```sql
HISTOGRAM(<expr>)

-- The following two forms are equivalent:
HISTOGRAM(<max_num_buckets>)(<expr>)
HISTOGRAM(<expr> [, <max_num_buckets>])
```

| Parameter | Description |
Expand Down Expand Up @@ -99,6 +101,8 @@ This example shows how `HISTOGRAM(2)` groups c_int values into two buckets:

```sql
SELECT HISTOGRAM(2)(c_int) FROM histagg;
-- Or
SELECT HISTOGRAM(c_int, 2) FROM histagg;

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ histogram(2)(c_int) │
Expand Down

0 comments on commit 07f23b7

Please sign in to comment.