Skip to content

Commit 7bdf08a

Browse files
BohuTANGclaude
andauthored
Restructure query guides with improved organization and navigation (#2706)
* improve guides/query * fix: remove broken links from DDL docs to query guides Remove external links from DDL documentation to query guides to maintain independence between SQL reference and user guides sections. This fixes build failures caused by broken links after query guides restructuring. Changes: - Remove references to query-profile from EXPLAIN and monitoring docs - Replace external links with inline examples in CREATE FUNCTION docs - Update stored procedure references to use DDL documentation - Remove guide links from aggregating index and dictionary functions - Update UDF link paths to match new hierarchical structure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * trigger fresh build --------- Co-authored-by: Claude <[email protected]>
1 parent 01f80b6 commit 7bdf08a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1428
-1032
lines changed

docs/cn/release-notes/databend.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---
2-
sidebar_label: Databend 版本发布
3-
title: Databend 版本发布
2+
sidebar_label: Databend Releases
3+
title: Databend Releases
44
sidebar_position: 1
55
slug: /
66
---
77

88
import StepsWrap from '@site/src/components/StepsWrap';
99
import StepContent from '@site/src/components/Steps/step-content';
1010

11-
本页面提供 <a href="https://github.com/databendlabs/databend">Databend</a> 最新功能、增强与错误修复的相关信息。
11+
This page provides information about recent features, enhancements, and bug fixes for <a href="https://github.com/databendlabs/databend">Databend</a>.
12+
13+
1214

1315
import MD1 from '@site/docs/release-stable/2025-04-21_v1.2.725.md';
1416
import MD2 from '@site/docs/release-stable/2025-02-14_v1.2.697.md';
@@ -35,138 +37,138 @@ import MD17 from '@site/docs/release-stable/2023-12-13_v1.2.233.md';
3537

3638
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.725" number="-1">
3739

38-
## 2025 年 4 月 21 日(v1.2.725
40+
## Apr 21, 2025 (v1.2.725)
3941

4042
<MD1 />
4143

4244
</StepContent>
4345

4446
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.697" number="">
4547

46-
## 2025 年 2 月 14 日(v1.2.697
48+
## Feb 14, 2025 (v1.2.697)
4749

4850
<MD2 />
4951

5052
</StepContent>
5153

5254
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.680" number="">
5355

54-
## 2025 年 1 月 2 日(v1.2.680
56+
## Jan 2, 2025 (v1.2.680)
5557

5658
<MD3 />
5759

5860
</StepContent>
5961

6062
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.615" number="">
6163

62-
## 2024 年 8 月 19 日(v1.2.615
64+
## Aug 19, 2024 (v1.2.615)
6365

6466
<MD4 />
6567

6668
</StepContent>
6769

6870
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.609" number="">
6971

70-
## 2024 年 8 月 13 日(v1.2.609
72+
## Aug 13, 2024 (v1.2.609)
7173

7274
<MD5 />
7375

7476
</StepContent>
7577

7678
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.530" number="">
7779

78-
## 2024 年 6 月 16 日(v1.2.530
80+
## Jun 16, 2024 (v1.2.530)
7981

8082
<MD6 />
8183

8284
</StepContent>
8385

8486
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.452" number="">
8587

86-
## 2024 年 5 月 6 日(v1.2.452
88+
## May 6, 2024 (v1.2.452)
8789

8890
<MD7 />
8991

9092
</StepContent>
9193

9294
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.410" number="">
9395

94-
## 2024 年 4 月 8 日(v1.2.410
96+
## Apr 8, 2024 (v1.2.410)
9597

9698
<MD8 />
9799

98100
</StepContent>
99101

100102
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.371" number="">
101103

102-
## 2024 年 3 月 11 日(v1.2.371
104+
## Mar 11, 2024 (v1.2.371)
103105

104106
<MD9 />
105107

106108
</StepContent>
107109

108110
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.344" number="">
109111

110-
## 2024 年 2 月 22 日(v1.2.344
112+
## Feb 22, 2024 (v1.2.344)
111113

112114
<MD10 />
113115

114116
</StepContent>
115117

116118
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.307" number="">
117119

118-
## 2024 年 1 月 25 日(v1.2.307
120+
## Jan 25, 2024 (v1.2.307)
119121

120122
<MD11 />
121123

122124
</StepContent>
123125

124126
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.292" number="">
125127

126-
## 2024 年 1 月 11 日(v1.2.292
128+
## Jan 11, 2024 (v1.2.292)
127129

128130
<MD12 />
129131

130132
</StepContent>
131133

132134
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.290" number="">
133135

134-
## 2024 年 1 月 10 日(v1.2.290
136+
## Jan 10, 2024 (v1.2.290)
135137

136138
<MD13 />
137139

138140
</StepContent>
139141

140142
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.279" number="">
141143

142-
## 2024 年 1 月 2 日(v1.2.279
144+
## Jan 2, 2024 (v1.2.279)
143145

144146
<MD14 />
145147

146148
</StepContent>
147149

148150
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.275" number="">
149151

150-
## 2023 年 12 月 30 日(v1.2.275
152+
## Dec 30, 2023 (v1.2.275)
151153

152154
<MD15 />
153155

154156
</StepContent>
155157

156158
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.262" number="">
157159

158-
## 2023 年 12 月 20 日(v1.2.262
160+
## Dec 20, 2023 (v1.2.262)
159161

160162
<MD16 />
161163

162164
</StepContent>
163165

164166
<StepContent outLink="https://github.com/databendlabs/databend/releases/tag/v1.2.233" number="">
165167

166-
## 2023 年 12 月 13 日(v1.2.233
168+
## Dec 13, 2023 (v1.2.233)
167169

168170
<MD17 />
169171

170172
</StepContent>
171173

172-
</StepsWrap>
174+
</StepsWrap>

docs/en/guides/00-products/01-dee/10-enterprise-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This page provides an updated list of available enterprise features. To access t
2020
| [Ngram Index](/guides/performance/ngram-index) | Query Performance | Accelerate LIKE pattern matching queries with wildcard searches. |
2121
| [Virtual Column](/sql/sql-commands/ddl/virtual-column) | Query Performance | Automatically accelerate JSON queries with zero-configuration performance optimization for VARIANT data. |
2222
| [Dynamic Column](/sql/sql-commands/ddl/table/ddl-create-table#computed-columns) | Query Performance | Generate columns automatically from scalar expressions with stored or virtual calculation modes. |
23-
| [Python UDF](/guides/query/udf#python-requires-databend-enterprise) | Advanced Analytics | Execute Python code within SQL queries using built-in handler. |
23+
| [Python UDF](/guides/query/advanced/udf#python-requires-databend-enterprise) | Advanced Analytics | Execute Python code within SQL queries using built-in handler. |
2424
| [ATTACH TABLE](/sql/sql-commands/ddl/table/attach-table) | Data Sharing | Create read-only links to existing table data with zero-copy access across environments. |
2525
| [Stream](/sql/sql-commands/ddl/stream) | Change Data Capture | Track and capture table changes for incremental data processing. |
2626
| [Vacuum Temp Files](/sql/sql-commands/administration-cmds/vacuum-temp-files) | Storage Management | Clean up temporary files (join, aggregate, sort spills) to free storage space. |

docs/en/guides/20-cloud/20-manage/01-monitor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The **SQL History** tab displays a list of SQL statements that have been execute
2727
Clicking a record on the **SQL History** page reveals detailed information on how Databend Cloud executed the SQL statement, providing access to the following tabs:
2828

2929
- **Query Details**: Includes Query State (success or failure), Rows Scanned, Warehouse, Bytes Scanned, Start Time, End Time, and Handler Type.
30-
- **Query Profile**: Illustrates how the SQL statement was executed. For more information, see [Query Profile](/guides/query/query-profile).
30+
- **Query Profile**: Illustrates how the SQL statement was executed.
3131

3232
## Task History
3333

docs/en/guides/51-ai-functions/01-external-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ LIMIT 5;
7878

7979
## Learn More
8080

81-
- **[External Functions Guide](/guides/query/external-function)** - Complete setup and deployment instructions
81+
- **[External Functions Guide](/guides/query/advanced/external-function)** - Complete setup and deployment instructions
8282
- **[Databend Cloud](https://databend.com)** - Try external functions with a free account
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Basic Queries",
3+
"position": 1
4+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Aggregating Data
3+
---
4+
5+
Learn to summarize and analyze data using GROUP BY, aggregate functions, and advanced grouping techniques.
6+
7+
## Basic Aggregation
8+
9+
### Common Aggregate Functions
10+
```sql
11+
-- Count rows
12+
SELECT COUNT(*) FROM employees;
13+
14+
-- Statistical functions
15+
SELECT
16+
AVG(salary) as avg_salary,
17+
MIN(salary) as min_salary,
18+
MAX(salary) as max_salary,
19+
SUM(salary) as total_salary
20+
FROM employees;
21+
```
22+
23+
## GROUP BY Fundamentals
24+
25+
### Single Column Grouping
26+
```sql
27+
-- Count employees by department
28+
SELECT department, COUNT(*) as emp_count
29+
FROM employees
30+
GROUP BY department;
31+
32+
-- Average salary by department
33+
SELECT department, AVG(salary) as avg_salary
34+
FROM employees
35+
GROUP BY department
36+
ORDER BY avg_salary DESC;
37+
```
38+
39+
### Multiple Column Grouping
40+
```sql
41+
-- Group by department and hire year
42+
SELECT
43+
department,
44+
EXTRACT(YEAR FROM hire_date) as hire_year,
45+
COUNT(*) as count,
46+
AVG(salary) as avg_salary
47+
FROM employees
48+
GROUP BY department, EXTRACT(YEAR FROM hire_date)
49+
ORDER BY department, hire_year;
50+
```
51+
52+
### GROUP BY with HAVING
53+
```sql
54+
-- Find departments with more than 5 employees
55+
SELECT department, COUNT(*) as emp_count
56+
FROM employees
57+
GROUP BY department
58+
HAVING COUNT(*) > 5;
59+
60+
-- Departments with average salary > 70000
61+
SELECT department, AVG(salary) as avg_salary
62+
FROM employees
63+
GROUP BY department
64+
HAVING AVG(salary) > 70000;
65+
```
66+
67+
## Advanced Grouping
68+
69+
### GROUP BY ALL
70+
```sql
71+
-- Automatically group by all non-aggregate columns
72+
SELECT department, job_title, COUNT(*) as count
73+
FROM employees
74+
GROUP BY ALL;
75+
```
76+
77+
## Advanced Grouping Extensions
78+
79+
Databend supports SQL:2003 standard grouping extensions:
80+
81+
- **[ROLLUP](./groupby/group-by-rollup.md)** - Hierarchical subtotals
82+
- **[CUBE](./groupby/group-by-cube.md)** - All possible combinations
83+
- **[GROUPING SETS](./groupby/group-by-grouping-sets.md)** - Custom combinations
84+
85+
## Best Practices
86+
87+
1. **Use appropriate aggregates** - COUNT(*) vs COUNT(column)
88+
2. **Filter before grouping** - Use WHERE before GROUP BY
89+
3. **Use HAVING for aggregate conditions** - Filter groups after aggregation
90+
4. **Consider indexes** - GROUP BY columns should be indexed

0 commit comments

Comments
 (0)