turbot/hackernews_insights

Query: hackernews_stories_details

Usage

powerpipe query hackernews_insights.query.hackernews_stories_details

SQL

with stories as (
select * from hackernews_new where $1 = 'New'
union
select * from hackernews_top where $1 = 'Top'
union
select * from hackernews_best where $1 = 'Best'
)
select
id as "ID",
by as "By",
to_char(time::timestamptz, 'YYYY-MM-DD HH24:MI:SS') as "Time",
score as "Score",
descendants as "Comments",
title as "Title",
url as "URL"
from
stories
order by
score desc,
descendants desc;

Params

ArgsNameDefaultDescriptionVariable
$1story_type

    Dashboards

    The query is used in the dashboards: