Skip to content

Commit a76f8e7

Browse files
committed
fix: correct database query examples in templates
1 parent 4af99e0 commit a76f8e7

8 files changed

Lines changed: 8 additions & 0 deletions

File tree

backend/templates/sql_examples/AWS_Redshift.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ template:
5151
COUNT("t1"."订单ID") AS "total_orders",
5252
CONCAT(ROUND("t1"."折扣率" * 100, 2), '%') AS "discount_percent"
5353
FROM "TEST"."SALES" "t1"
54+
GROUP BY "t1"."订单ID", "t1"."金额", "t1"."折扣率"
5455
LIMIT 100
5556
</output-good>
5657
</example>

backend/templates/sql_examples/DM.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ template:
5252
COUNT("t1"."订单ID") AS "total_orders",
5353
TO_CHAR("t1"."折扣率" * 100, '990.99') || '%' AS "discount_percent"
5454
FROM "TEST"."ORDERS" "t1"
55+
GROUP BY "t1"."订单ID", "t1"."金额", "t1"."折扣率"
5556
LIMIT 100
5657
</output-good>
5758
</example>

backend/templates/sql_examples/Doris.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ template:
5353
COUNT(`t1`.`订单ID`) AS `total_orders`,
5454
CONCAT(ROUND(`t1`.`折扣率` * 100, 2), '%') AS `discount_percent`
5555
FROM `test`.`orders` `t1`
56+
GROUP BY `t1`.`订单ID`, `t1`.`金额`, `t1`.`折扣率`
5657
LIMIT 100
5758
</output-good>
5859
</example>

backend/templates/sql_examples/Hive.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ template:
5252
COUNT(`t1`.`订单ID`) AS `total_orders`,
5353
CONCAT(CAST(ROUND(`t1`.`折扣率` * 100, 2) AS STRING), '%') AS `discount_percent`
5454
FROM `ods`.`orders` `t1`
55+
GROUP BY `t1`.`订单ID`, `t1`.`金额`, `t1`.`折扣率`
5556
LIMIT 100
5657
</output-good>
5758
</example>

backend/templates/sql_examples/Microsoft_SQL_Server.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ template:
5252
COUNT([o].[订单ID]) AS [total_orders],
5353
CONVERT(VARCHAR, ROUND([o].[折扣率] * 100, 2)) + '%' AS [discount_percent]
5454
FROM [Sales].[Orders] [o]
55+
GROUP BY [o].[订单ID], [o].[金额], [o].[折扣率]
5556
</output-good>
5657
</example>
5758

backend/templates/sql_examples/MySQL.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ template:
5151
COUNT(`t1`.`订单ID`) AS `total_orders`,
5252
CONCAT(ROUND(`t1`.`折扣率` * 100, 2), '%') AS `discount_percent`
5353
FROM `test`.`orders` `t1`
54+
GROUP BY `t1`.`订单ID`, `t1`.`金额`, `t1`.`折扣率`
5455
LIMIT 100
5556
</output-good>
5657
</example>

backend/templates/sql_examples/Oracle.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ template:
116116
COUNT("t1"."订单ID") AS "total_orders",
117117
TO_CHAR("t1"."折扣率" * 100, '990.99') || '%' AS "discount_percent"
118118
FROM "TEST"."ORDERS" "t1"
119+
GROUP BY "t1"."订单ID", "t1"."金额", "t1"."折扣率"
119120
WHERE ROWNUM <= 100
120121
</output-good>
121122
</example>

backend/templates/sql_examples/PostgreSQL.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ template:
4646
COUNT("t1"."订单ID") AS "total_orders",
4747
ROUND("t1"."折扣率" * 100, 2) || '%' AS "discount_percent"
4848
FROM "TEST"."ORDERS" "t1"
49+
GROUP BY "t1"."订单ID", "t1"."金额", "t1"."折扣率"
4950
LIMIT 100
5051
</output-good>
5152
</example>

0 commit comments

Comments
 (0)