SELECT
product_name,
SUM(monthly_sales) AS total_monthly_sales,
RANK() OVER (PARTITION BY class ORDER BY SUM(monthly_sales) DESC) AS sales_rank
FROM
`sales_data`
WHERE
EXTRACT(YEAR FROM sale_date) = 2023
GROUP BY
product_name, class, EXTRACT(MONTH FROM sale_date)
But it surely’s nonetheless a far cry from having the ability to flip one thing like “/* give me an inventory of merchandise by class, ranked by month-to-month gross sales in 2023 */” right into a working question that does what the consumer needs.
Minimizing friction in daily duties
Robert Kramer, principal analyst at Moor Insights and Technique, stated these working with knowledge are inclined to suppose by way of questions and outcomes, not syntax. “Translating intent into correct and environment friendly SQL nonetheless takes time, particularly with joins, time logic, and repetitive patterns. By permitting pure language expressions inside SQL feedback, Google is attempting to hurry up that translation whereas conserving SQL because the execution layer,” he stated.
With the brand new function, groups might spend extra time decoding outcomes and fewer time writing and rewriting queries, creating extra automated analytics processes down the highway whereas dashing up insights, minimizing group handoffs, and saving time on question setup, he added.
