File size: 1,283 Bytes
9689761 995cafe 53ffb6e 9689761 995cafe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ---
license: cc0-1.0
viewer: false
---
# Aix-compatible Lichess database
This dataset contains the [Lichess database](https://database.lichess.org/) of 7+ billion chess games, but in a format queryable using [Aix](https://github.com/thomas-daniels/aix), with the [`aixchess` extension for DuckDB](https://duckdb.org/community_extensions/extensions/aixchess).
Three compression levels (Low, Medium, and High) are offered for the chess game encoding, enabling a trade-off between decoding speed and size. The Parquet files themselves are all zstd-compressed at level 19.
Generated using [pgn-to-aix](https://github.com/thomas-daniels/aix/tree/main/pgn-to-aix).
See [my blog post](https://thomasd.be/2026/02/01/aix-storing-querying-chess-games.html) for more details.
Example DuckDB commands:
```sql
INSTALL aixchess FROM community;
LOAD aixchess;
-- Count en passant moves played in Lichess games from January 2013
WITH lichess_2013_01 AS (
FROM 'hf://datasets/thomasd1/aix-lichess-database/low_compression/aix_lichess_2013-01_low.parquet'
),
en_passant_move_count AS (
SELECT
SUM(
move_details(movedata).filter(lambda m: m.is_en_passant).length()
) AS nb_ep_moves
FROM lichess_2013_01
)
FROM en_passant_move_count;
-- Result: 3496
``` |