turbot/hackernews
steampipe plugin install hackernews

Table: hackernews_ask_hn - Query Hacker News Ask HN posts using SQL

Hacker News is a social news website focusing on computer science and entrepreneurship. It is run by Paul Graham's investment fund and startup incubator, Y Combinator. In particular, the Ask HN section of the site allows users to ask the Hacker News community questions.

Table Usage Guide

The hackernews_ask_hn table provides insights into Ask HN posts on Hacker News. As a data analyst, explore post-specific details through this table, including author, score, and number of comments. Utilize it to uncover information about the most popular posts, the most active authors, and the discussions that generate the most comments.

Examples

Ask HN stories by score

Explore the most popular Ask HN stories on Hackernews, organized by their popularity score. This allows you to quickly identify and engage with the most impactful discussions.

select
*
from
hackernews_ask_hn
order by
score desc;
select
*
from
hackernews_ask_hn
order by
score desc;

Ask HN stories with most comments

Discover the Ask HN stories that have garnered the most engagement, allowing you to focus on popular topics and trends within the HackerNews community. This could be particularly useful for content creators, marketers, or researchers looking for highly interactive themes.

select
*
from
hackernews_ask_hn
order by
descendants desc;
select
*
from
hackernews_ask_hn
order by
descendants desc;

Schema for hackernews_ask_hn

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
bytextThe username of the item's author.
deadbooleanTrue if the item is dead.
deletedbooleanTrue if the item is deleted.
descendantsbigintIn the case of stories or polls, the total comment count.
idbigint=The item's unique id.
kidsjsonbThe ids of the item's comments, in ranked display order.
parentbigintThe comment's parent: either another comment or the relevant story.
partsjsonbA list of related pollopts, in display order.
pollbigintThe pollopt's associated poll.
scorebigintThe story's score, or the votes for a pollopt.
texttextThe comment, story or poll text. HTML.
timetimestamp with time zoneTimestamp when the item was created.
titletextThe title of the story, poll or job. HTML.
typetextThe type of item. One of "job", "story", "comment", "poll", or "pollopt".
urltextThe URL of the story.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- hackernews

You can pass the configuration to the command with the --config argument:

steampipe_export_hackernews --config '<your_config>' hackernews_ask_hn