# ggsql

> **TL;DR.** ggsql is an experimental SQL extension that brings the Grammar of Graphics into the query language itself.

- **Category:** Data / Visualization / Query Language
- **Stage:** validating
- **Age:** 57 days
- **Origin date:** 2026-04-20
- **First detected:** 2026-04-21
- **Canonical URL:** https://earlyterms.com/term/ggsql
- **Sources:** 5 primary URLs

## Definition

ggsql is an experimental SQL extension that brings the Grammar of Graphics into the query language itself. You add clauses like `VISUALISE`, `DRAW`, `SCALE`, and `FACET` to an ordinary SELECT, and the engine turns your visual spec into a chart without leaving SQL.

It debuted as an [alpha release from Posit on April 20, 2026](https://opensource.posit.co/blog/2026-04-20_ggsql_alpha_release/), authored by Thomas Lin Pedersen, Teun van den Brand, George Stagg, and Hadley Wickham — the team behind ggplot2. Implemented in Rust and [open-sourced under MIT](https://github.com/posit-dev/ggsql), it pushes all computation down to the database and reached 433 points on Hacker News the day it shipped.

## Example

A minimal ggsql query pairs a SELECT with visual clauses — for example `SELECT * FROM ggsql:penguins VISUALISE bill_len AS x, bill_dep AS y, species AS color DRAW point DRAW smooth` — which returns a scatter plot with a smoothed trend line rendered directly from a [DuckDB backend](https://duckdb.org/).

## Analogy

Like pouring ggplot2's layer syntax straight into your SQL console — same cake, different oven.

## Why it's emerging now

Posit released ggsql in alpha on April 20, 2026, authored by the ggplot2 team including Thomas Lin Pedersen and Hadley Wickham. The Rust-built extension lets SQL users describe charts with `VISUALISE`/`DRAW` clauses and pushes computation to the database — a declarative visualization interface pitched as LLM-friendly from day one.

## Related terms

- *parent:* ggplot2
- *parent:* Grammar of Graphics
- *competitor:* Vega-Lite
- *competitor:* dbplyr
- *competitor:* Malloy
- *related:* Quarto
- *related:* Positron
- *related:* DuckDB
- *related:* Posit
- *competitor:* Vega-Altair

## Sources

1. [Posit Open Source — ggsql alpha announcement](https://opensource.posit.co/blog/2026-04-20_ggsql_alpha_release/)
2. [Official site ggsql.org](https://ggsql.org/)
3. [GitHub — posit-dev/ggsql](https://github.com/posit-dev/ggsql)
4. [Hacker News — ggsql launch thread](https://news.ycombinator.com/item?id=47833558)
5. [Thomas Lin Pedersen launch tweet](https://x.com/thomasp85/status/2046208115914281049)

---
_Generated by EarlyTerms · https://earlyterms.com/term/ggsql_
