Built and run by one person.

How do I find a cricket match when I only half remember it?

Filter on the thing you remember, which is almost always an aggregate. You rarely remember a match id. You remember a score, a partnership, an over that went wrong. So group the deliveries, put a tolerance band in the HAVING clause, and join to the match table for the date, venue and result. Start wide and narrow.

A worked one. Someone made about 98 off about 60 balls and you cannot place the game:

SELECT b.match_id, m.start_date, m.venue, b.striker,
       SUM(b.runs_off_bat) AS runs,
       COUNT(*) FILTER (WHERE b.wides IS NULL) AS balls_faced
FROM ball_by_ball b JOIN match_info m USING (match_id)
GROUP BY 1,2,3,4
HAVING SUM(b.runs_off_bat) BETWEEN 96 AND 100
   AND COUNT(*) FILTER (WHERE b.wides IS NULL) BETWEEN 58 AND 62
ORDER BY m.start_date DESC

Four things break this quietly, and every one returns a plausible answer.

The general shape. This is a tolerance problem. Widen the band until something comes back, sort by date, and add a second remembered detail as a filter rather than tightening the first one.

Both engines take this SQL and the whole database is downloadable if you would rather work locally: https://www.tigzig.com/apis/database, and db-mcp.tigzig.com for an agent. Related: why a cricket query returns the wrong numbers, and how to key a single delivery. Write-up: https://www.tigzig.com/post/cricket-five-million-balls-teams-sep2026.

Building something like this? How I work covers the rates, the availability and what I take on.

← All Agents FAQ