Databricks Genie 入门
Gang Wang
Senior Data Scientist

$$
"What is the top revenue-generating product?"
Genie 可能会对分组与聚合进行猜测。
SQL 示例可确保它每次都遵循您的一致范式。

何时用 SQL 函数
何时用示例查询
自然语言描述
"Identify the top revenue-generating product"
贴近用户真实提问方式
$$
自然语言描述
"Identify the top revenue-generating product"
贴近用户真实提问方式
已验证的 SQL
SELECT
`product`,
SUM(`totalPrice`) as total_revenue,
COUNT(*) as transaction_count,
SUM(`quantity`) as total_quantity_sold
FROM
`samples`.`bakehouse`.`sales_transactions`
GROUP BY
`product`
ORDER BY
total_revenue DESC
Genie 使用您的一致范式

$$
对于要求绝对准确的关键 KPI,Genie 提供 Trusted Assets——已验证的查询,每次都会运行您的一致 SQL。
我们将在第 4 章介绍其创建与使用。
Databricks Genie 入门