hackernews_dashboard_ask_and_show_by_hourhackernews_dashboard_ask_counthackernews_dashboard_avg_ask_scorehackernews_dashboard_avg_scorehackernews_dashboard_avg_show_scorehackernews_dashboard_max_scorehackernews_dashboard_mentionshackernews_dashboard_show_counthackernews_dashboard_stories_by_hourhackernews_dashboard_user_with_greater_than_50_scorehackernews_dashboard_user_with_greater_than_5_posthackernews_jobs_by_dayshackernews_jobs_by_technologyhackernews_jobs_by_typehackernews_jobs_searchhackernews_sources_detailhackernews_sources_domain_inputhackernews_sources_domainshackernews_sources_top_10_domains_by_counthackernews_sources_top_10_domains_by_max_scorehackernews_stories_avg_commentshackernews_stories_detailshackernews_stories_max_comments
Query: hackernews_dashboard_ask_and_show_by_hour
Usage
powerpipe query hackernews_insights.query.hackernews_dashboard_ask_and_show_by_hour
Steampipe Tables
SQL
with ask_hn as ( select to_char(time::timestamptz,'MM-DD HH24:00') as hour from hackernews_new where time::timestamptz > now() - interval '14 day' and title ~ '^Ask HN:'),show_hn as ( select to_char(time::timestamptz,'MM-DD HH24:00') as hour from hackernews_new where time::timestamptz > now() - interval '14 day' and title ~ '^Show HN:')select hour, count(a.*) as "Ask HN", count(s.*) as "Show HN"from ask_hn aleft join show_hn susing (hour)group by hourorder by hour
Dashboards
The query is used in the dashboards: