live wire
▸EKOS submits 70.15% on BIRD’s hidden test and 88.33% on Mini-Dev with different Claude models; both entries are pendingBIRD submission PR #270▸MotherDuck rolls out DuckDB 2.0 with async I/O and reports faster cold reads in TPC-H and TPC-DS testsMotherDuck▸ThoughtSpot Spotter starts rolling out answer explanations for token-based results, not AgentQLThoughtSpot▸Snowflake previews Z.ai GLM 5.4 in Cortex Inference, but not in Cortex AgentsSnowflake release notes▸Removing Vietnamese diacritics cut text-to-SQL accuracy by 10.3–37.0 points across four models in an author studyLe Trung et al., Vietnamese MultiSpider artifacts▸Avelis 1.7 adds AI-built dashboards and reruns pinned exploratory SQL under each viewer’s permissionsAvelis release notes▸Aurora MySQL previews cluster groups with one routing endpoint; each query still runs on one clusterAWS What's New▸Rewind-HNSW uses 86.9% less memory than full snapshots in authors’ 20-version testsShea et al., Rewind-HNSW §5.5▸Snowflake previews pausing downstream dynamic table refreshes when data quality checks failSnowflake release notes▸BigQuery previews optional GoogleSQL optimization suggestions in its interactive SQL translatorGoogle Cloud documentation▸Snowflake extends its Tableau and Power BI dashboard migration preview to Azure deploymentsSnowflake release notes▸Google Cloud makes it generally available to unpublish Iceberg data shares from SAP Business Data CloudGoogle Cloud — BigQuery and Lakehouse documentation▸AWS previews organization-wide cost questions in Ops Agent for FinOpsAWS What's New▸Looker updates require API login credentials in the request body, not the URLGoogle Cloud — Looker documentation▸EKOS submits 70.15% on BIRD’s hidden test and 88.33% on Mini-Dev with different Claude models; both entries are pendingBIRD submission PR #270▸MotherDuck rolls out DuckDB 2.0 with async I/O and reports faster cold reads in TPC-H and TPC-DS testsMotherDuck▸ThoughtSpot Spotter starts rolling out answer explanations for token-based results, not AgentQLThoughtSpot▸Snowflake previews Z.ai GLM 5.4 in Cortex Inference, but not in Cortex AgentsSnowflake release notes▸Removing Vietnamese diacritics cut text-to-SQL accuracy by 10.3–37.0 points across four models in an author studyLe Trung et al., Vietnamese MultiSpider artifacts▸Avelis 1.7 adds AI-built dashboards and reruns pinned exploratory SQL under each viewer’s permissionsAvelis release notes▸Aurora MySQL previews cluster groups with one routing endpoint; each query still runs on one clusterAWS What's New▸Rewind-HNSW uses 86.9% less memory than full snapshots in authors’ 20-version testsShea et al., Rewind-HNSW §5.5▸Snowflake previews pausing downstream dynamic table refreshes when data quality checks failSnowflake release notes▸BigQuery previews optional GoogleSQL optimization suggestions in its interactive SQL translatorGoogle Cloud documentation▸Snowflake extends its Tableau and Power BI dashboard migration preview to Azure deploymentsSnowflake release notes▸Google Cloud makes it generally available to unpublish Iceberg data shares from SAP Business Data CloudGoogle Cloud — BigQuery and Lakehouse documentation▸AWS previews organization-wide cost questions in Ops Agent for FinOpsAWS What's New▸Looker updates require API login credentials in the request body, not the URLGoogle Cloud — Looker documentation
nl2sql.ai
guideSQL PRACTICE

Snowflake can turn a three-cent invoice total into four cents by rounding each line first

Two fixed-point amounts are enough to test whether a SQL agent follows the billing policy or just formats the result.

By The News Desk· Nov 29, 2026the quick take — two AI hosts go live when you do

Ask a SQL agent to “show the invoice total to two decimal places,” and there are two places it might put ROUND: inside SUM, where it changes each line, or outside SUM, where it changes only the total. Both queries can return a number with two decimal places. They need not return the same number. Snowflake’s ROUND reference documents half-away-from-zero as the default for decimal halfway values, and its SUM reference documents what gets added.

A two-line reconciliation test

Use a synthetic invoice with two unrounded line amounts of 0.015 each. The fixed-point cast makes this a test of rounding order rather than of a floating-point approximation near the halfway value. Snowflake’s ROUND reference cautions that floating-point values might not round as expected.

WITH invoice_lines AS (
  SELECT column1::NUMBER(10,3) AS amount
  FROM VALUES (0.015), (0.015)
)
SELECT
  SUM(ROUND(amount, 2)) AS sum_of_rounded_lines,
  ROUND(SUM(amount), 2) AS rounded_invoice_total
FROM invoice_lines;

The expected results under the documented rules are 0.04 and 0.03. In the first expression each 0.015 becomes 0.02, and the two rounded lines are added. In the second expression the raw values sum to 0.030, which becomes 0.03 when rounded to two places. These are calculated expectations for the fixture, not results from a live Snowflake account.

Put the rounding step in the metric definition

If the report must reconcile to the sum of separately rounded line amounts, make line-level rounding explicit. If the invoice policy says to add unrounded amounts and round once, make invoice-level rounding explicit instead. If the reporting model already stores authoritative posted totals, consider using those as the reconciliation target rather than asking the agent to reconstruct them from raw amounts. Neither SQL expression establishes what the billing system actually posted.

For an acceptance test, give the agent the same fixture under both policies and check the result and the generated SQL. Document the rounding mode separately from the rounding stage: Snowflake also supports explicit HALF_TO_EVEN for fixed-point inputs, but choosing a mode does not tell the agent where to apply it. The two-line fixture makes that missing instruction visible before anyone has to reconcile a real invoice.

sources

Filed by The News Desk. Corrections: desk@nl2sql.ai · Our standards →

comments · 0

    Comments are moderated before they appear. Your email is used once to confirm it is you — never shown, never sold. Corrections and questions get an answer from the desk when we have one.