Skip to content

Commit

Permalink
Update SELECT.md add pivot version (#51020)
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Jing <[email protected]>
Signed-off-by: 絵空事スピリット <[email protected]>
Co-authored-by: 絵空事スピリット <[email protected]>
  • Loading branch information
DanJing-coder and EsoragotoSpirit authored Sep 14, 2024
1 parent 4697e4a commit d286873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,8 @@ select one.tiny_column, two.int_column from small_table one, <br/> big_table two
### PIVOT
This feature is supported from v3.3 onwards.
The PIVOT operation is an advanced feature in SQL that allows you to transform rows into columns in a table, which is particularly useful for creating pivot tables. This comes in handy when dealing with database reports or analytics, especially when you need to summarize or categorize data for presentation.
Actually, the PIVOT is a syntax sugar, which can simplify the writing of the query statement like `sum(case when ... then ... end)`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,8 @@ select one.tiny_column, two.int_column from small_table one, big_table two where
### PIVOT
该函数从 3.3 版本开始支持。
PIVOT操作符是SQL中的一个高级特性,它允许你将表中的行转换为列,通常用于数据透视表的创建。这在处理数据库报表或分析时非常有用,特别是当你需要对数据进行汇总或分类展示时。
实际上,PIVOT 是一种语法糖,它可以简化像 sum(case when ... then ... end) 这样的查询语句的编写。
Expand Down

0 comments on commit d286873

Please sign in to comment.