Available tables, view & macros
The database is read-only. All queries run in your browser via DuckDB-WASM.
Table snapshots
One row per (source × scrape day × rank position).
| Column | Type | Notes |
|---|---|---|
show_id | VARCHAR (md5 hex) | Stable per-show identifier across rebuilds. |
source | VARCHAR | 'imdb' or 'kinopoisk'. |
is_imdb / is_kinopoisk | BOOLEAN | Convenience source flags. |
scrape_date | DATE | From filename (timezone-safe). |
rank | INTEGER | Position in the source's chart on that day. |
title, title_ru | VARCHAR | As scraped that day. |
url | VARCHAR | Source page for the show. |
source_id | VARCHAR | IMDb tt-id or Kinopoisk numeric id. |
score | DOUBLE | Source's user score on that day. |
votes | BIGINT | Vote count on that day. |
release_year | INTEGER | |
scraped_at | TIMESTAMPTZ | Precise scrape timestamp. |
View shows
One row per show with cross-source identity already resolved.
| Column | Type | Notes |
|---|---|---|
show_id | VARCHAR | Include this column to enable per-show links in the table below. |
assumed_title | VARCHAR | IMDb title preferred, falling back to Kinopoisk English / Russian. |
title_ru | VARCHAR | Russian title from Kinopoisk if available. |
release_year | INTEGER | |
imdb_url, kinopoisk_url | VARCHAR | NULL when the show is not present on that source. |
days_in_rating | BIGINT | Distinct scrape dates the show appears on. |
first_seen, last_seen | DATE | |
best_rank, worst_rank, avg_rank | INTEGER / DOUBLE | |
avg_score, latest_score, latest_votes | DOUBLE / BIGINT | |
present_on_imdb, present_on_kinopoisk | BOOLEAN |
Table macros
Use these in FROM. They return tables; combine them with JOIN or IN (SELECT …).
| Macro | Returns | Example |
|---|---|---|
scrape_date_between(d1, d2) |
show_ids active in the window | SELECT s.* FROM shows s JOIN scrape_date_between('2026-05-01','2026-05-30') USING (show_id); |
hot_in(d1, d2) |
shows + in-window aggregates, sorted by avg rank | SELECT * FROM hot_in('2026-05-25','2026-05-30') LIMIT 20; |
rank_history(show_id) |
per-day rank, score, votes per source | SELECT * FROM rank_history((SELECT show_id FROM shows LIMIT 1)); |
find_show(q) |
shows whose assumed/Russian title contains q (case-insensitive) |
SELECT * FROM find_show('boys'); |