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?

  1. Write a question in tql. Name a league’s table on the from line and say what you want back; the editor completes column names as you type and marks anything that will not resolve.
  2. 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.
  3. 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.

Best starters of 2025, scored on three things at onceBest starters of 2025, scored on three things at once

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.

2025's best offenses, and where their defenses ranked2025's best offenses, and where their defenses ranked

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.

Every club's 2025 scoring, week by weekEvery club's 2025 scoring, week by week