liveBook · Manning

Float64

As explained in DuckDB in Action

A double is a floating-point numeric data type that stores values with approximately twice the precision of a single-precision value.

float64, written as DOUBLE in DuckDB, gives numeric fields the type needed for arithmetic when automatic inference leaves them as strings. A practical workflow is to inspect the inferred STRUCT, cast fields such as X, Y, and xG, then query the flattened data. section 5.3

Correcting shot coordinates and expected goals

Casting the nested shot record changes X, Y, and xG from VARCHAR to DOUBLE. The flattened view can then aggregate xG numerically, producing team totals such as Manchester City at 45.66 for season 2022.

How DuckDB in Action covers it

How deep it goes
Explains schema inspection, whole-STRUCT casting, and verification, but defers floating-point representation internals.
Examples
Uses football shot coordinates, expected-goals values, corrected schemas, and team-level xG totals.
What it assumes
Assumes basic SQL and nested-record familiarity while teaching schema inspection and type correction through a working dataset.
What you can do after
Operate/configure DuckDB to cast inferred JSON fields and perform numeric queries over flattened records.
How it connects
Connects DOUBLE with JSON, STRUCT types, schema inference, casting, views, and numeric aggregation.

Also explained in

Compare how 7 books explain float64 →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of DuckDB in Action. The section links point to the parts of the book it draws on.