Skip to content

Commit 8b8b293

Browse files
committed
add headings
1 parent bc864c6 commit 8b8b293

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/guides/developer/dynamic-column-selection.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ We're going to learn how to use this feature with help from the [New York taxis
1111

1212
<iframe width="768" height="432" src="https://www.youtube.com/embed/moabRqqHNo4?si=jgmInV-u3UxtLvMS" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
1313

14-
## Selecting columns that match a pattern
14+
## Selecting columns that match a pattern {#selecting-columns}
1515

1616
Let's start with a common scenario: selecting only the columns that contain `_amount` from the NYC taxi dataset. Instead of manually typing each column name, we can use the `COLUMNS` expression with a regular expression:
1717

@@ -60,7 +60,7 @@ LIMIT 3;
6060
└─────────────┴─────────┴────────────┴──────────────┴───────────┴──────────────┘
6161
```
6262

63-
## Selecting multiple patterns
63+
## Selecting multiple patterns {#selecting-multiple-patterns}
6464

6565
We can combine multiple column patterns in a single query:
6666

@@ -84,7 +84,7 @@ LIMIT 5;
8484
└─────────────┴────────────┴──────────────┴──────────────┴─────────────┴─────────────────────┴──────────────┴─────────────────────┘
8585
```
8686

87-
## Apply functions to all columns
87+
## Apply functions to all columns {#applying-functions}
8888

8989
We can also use the [`APPLY`](https://clickhouse.com/docs/sql-reference/statements/select#apply) modifier to apply functions across every column.
9090
For example, if we wanted to find the maximum value of each of those columns, we could run the following query:
@@ -153,7 +153,7 @@ FROM nyc_taxi.trips;
153153
└────────────────────────────┴────────────────────────┴───────────────────────────┴─────────────────────────────┴──────────────────────────┴─────────────────────────────┘
154154
```
155155

156-
## Replacing columns
156+
## Replacing columns {#replacing-columns}
157157

158158
So far so good. But let’s say we want to adjust one of the values, while leaving the other ones as they are. For example, maybe we want to double the total amount and divide the MTA tax by 1.1. We can do that by using the REPLACE clause, which will replace a column while leaving the other ones as they are.
159159

@@ -178,7 +178,7 @@ SELECT
178178
└────────────────────────────┴──────────────────────────┴───────────────────────────┴─────────────────────────────┴──────────────────────────┴──────────────────────────┘
179179
```
180180

181-
## Excluding columns
181+
## Excluding columns {#excluding-columns}
182182

183183
We can also choose to exclude a field by using the EXCEPT clause. For example, to remove the tolls_amount column, we would write the following query:
184184

0 commit comments

Comments
 (0)