@@ -111,15 +111,14 @@ static RANK_DOCUMENTATION: LazyLock<Documentation> = LazyLock::new(|| {
111111 skips ranks for identical values.",
112112
113113 "rank()" )
114- . with_sql_example ( r#"```sql
115- --Example usage of the rank window function:
116- SELECT department,
117- salary,
118- rank() OVER (PARTITION BY department ORDER BY salary DESC) AS rank
119- FROM employees;
120- ```
121-
114+ . with_sql_example ( r#"
122115```sql
116+ -- Example usage of the rank window function:
117+ SELECT department,
118+ salary,
119+ rank() OVER (PARTITION BY department ORDER BY salary DESC) AS rank
120+ FROM employees;
121+
123122+-------------+--------+------+
124123| department | salary | rank |
125124+-------------+--------+------+
@@ -130,7 +129,8 @@ static RANK_DOCUMENTATION: LazyLock<Documentation> = LazyLock::new(|| {
130129| Engineering | 90000 | 1 |
131130| Engineering | 80000 | 2 |
132131+-------------+--------+------+
133- ```"# )
132+ ```
133+ "# )
134134 . build ( )
135135} ) ;
136136
@@ -142,15 +142,14 @@ static DENSE_RANK_DOCUMENTATION: LazyLock<Documentation> = LazyLock::new(|| {
142142 Documentation :: builder ( DOC_SECTION_RANKING , "Returns the rank of the current row without gaps. This function ranks \
143143 rows in a dense manner, meaning consecutive ranks are assigned even for identical \
144144 values.", "dense_rank()" )
145- . with_sql_example ( r#"```sql
146- --Example usage of the dense_rank window function:
147- SELECT department,
148- salary,
149- dense_rank() OVER (PARTITION BY department ORDER BY salary DESC) AS dense_rank
150- FROM employees;
151- ```
152-
145+ . with_sql_example ( r#"
153146```sql
147+ -- Example usage of the dense_rank window function:
148+ SELECT department,
149+ salary,
150+ dense_rank() OVER (PARTITION BY department ORDER BY salary DESC) AS dense_rank
151+ FROM employees;
152+
154153+-------------+--------+------------+
155154| department | salary | dense_rank |
156155+-------------+--------+------------+
@@ -173,14 +172,12 @@ static PERCENT_RANK_DOCUMENTATION: LazyLock<Documentation> = LazyLock::new(|| {
173172 Documentation :: builder ( DOC_SECTION_RANKING , "Returns the percentage rank of the current row within its partition. \
174173 The value ranges from 0 to 1 and is computed as `(rank - 1) / (total_rows - 1)`.", "percent_rank()" )
175174 . with_sql_example ( r#"```sql
176- --Example usage of the percent_rank window function:
177- SELECT employee_id,
178- salary,
179- percent_rank() OVER (ORDER BY salary) AS percent_rank
180- FROM employees;
181- ```
175+ -- Example usage of the percent_rank window function:
176+ SELECT employee_id,
177+ salary,
178+ percent_rank() OVER (ORDER BY salary) AS percent_rank
179+ FROM employees;
182180
183- ```sql
184181+-------------+--------+---------------+
185182| employee_id | salary | percent_rank |
186183+-------------+--------+---------------+
0 commit comments