The query editor
The main feature of topspin is querying multiple different leagues with the same query language (tql). To run these queries, topspin offers a query editor with autocomplete, error and syntax highlighting, and sharing capabilities.
Use the query editor to build different datasets, promote the queries to a workspace to transform the data into a visualization, then share the query or the workspace with a permanent link.
How do I use this?
- Write a question in tql. Name a league’s table on the
fromline and say what you want back; the editor completes column names as you type and marks anything that will not resolve. - Run it, and read the answer under the editor. The same rows the examples below were photographed with — percentiles as badges, notes on what each number counts, and the sources it came from.
- Save it, and share the link. A saved query has a page of its own, and can be promoted into a workspace to be drawn as a chart beside others.
MLBExample 1: scoring several stats as one number
This query shows the best starting pitchers of 2025 scored on three stats at
once: composite(era, fip, war) ranks every qualifying season on each column
separately and scores it on where it placed across all three. The score is a
percentile rather than a sum, so it runs 0 to 100 within the field the
where matched, and it counts ERA and FIP with low as the achievement
without the query saying so, because the columns say so about themselves.


NFLExample 2: reading a number as a place in its league
This query shows each club’s 2025 scoring and pass rush as places among all
thirty-two clubs rather than as numbers, because four hundred and seventy
points is a figure nobody can read without knowing the season it was scored
in. keep points_for_percentile >= 75 is where said after the ranking has
run — a percentile does not exist until then — which is what leaves the top
quarter of the league standing.


NFLExample 3: laying an answer out as a matrix
This query shows every club’s 2025 season week by week, with pivot by week
turning five hundred and forty rows of three columns into one row per club
and one column per week. Nothing about what was asked changes: the columns
are values rather than columns, one for each week the answer contained, and a
pair with no row behind it comes back blank rather than as a zero, which here
is a club’s bye.

