Source
Query Stack Exchange with SQL
Questions and answers across the Stack Exchange network — Stack Overflow, Mathematics, and every other landed site — queryable with read-only SQL by site, tag, author, score, and text.
Query surfaces
stackexchange.postsembeddings.stackexchange_posts
Stack Exchange data dumps plus a quota-bounded API tail; source-native post records.
Best for
accepted answers and score-ranked questions per site and tag
Stack Overflow alone holds ~59.7M posts — scope site first
author output and score aggregates across sites
Fields
idsitesite_grouppost_typeparent_idtitlepayloadtagsoriginal_authororiginal_author_idscoreview_countanswer_countcomment_countaccepted_answer_idis_acceptedoriginal_timestamplast_activity_dateurimetadatasource_fileingested_atloaded_atsearch_text_lc
Read live from the schema registry for stackexchange.posts — 24 columns. Every relation's full contract is served by /v1/scry/schema.
Queries
Top-scored questions on a topic
Scope site and post type, then match lowercase tokens and rank by score.
SELECT id, title, score, original_timestamp
FROM stackexchange.posts
WHERE site = 'stackoverflow'
AND post_type = 'question'
AND hasAllTokens(search_text_lc, ['borrow', 'checker'])
ORDER BY score DESC
LIMIT 20;
Sites by size
One aggregate shows which sites landed and how large each is.
SELECT site, count() AS posts
FROM stackexchange.posts
GROUP BY site
ORDER BY posts DESC
LIMIT 20;