turbot/hackernews_insights

Query: hackernews_sources_top_10_domains_by_max_score

Usage

powerpipe query hackernews_insights.query.hackernews_sources_top_10_domains_by_max_score

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
substring(
url
from
'http[s]*://([^/$]+)'
) as "Domain",
max(score) as "Max Score"
from
hackernews_new
where
url != ''
group by
"Domain"
order by
"Max Score" desc
limit
10

Params

ArgsNameDefaultDescriptionVariable
$1story_type

    Dashboards

    The query is used in the dashboards: