Table: reddit_my_saved_comment - Query Reddit Saved Comments using SQL
Reddit is a social news aggregation, web content rating, and discussion website. Registered members submit content to the site such as links, text posts, and images, which are then voted up or down by other members. The saved comments feature allows users to save specific comments for later reference.
Table Usage Guide
The reddit_my_saved_comment
table provides insights into user's saved comments within Reddit. As a data analyst, explore user-specific details through this table, including the content of the saved comments, the author of the comments, and the subreddit in which the comments were made. Utilize it to uncover information about user behavior and preferences, such as the topics they are interested in and the discussions they engage in. The schema presents a range of attributes of the saved comments for your analysis, like the comment body, creation date, author, and associated subreddit.
Examples
List five most recent comments
Explore the most recent discussions you've saved on Reddit. This query is useful for quickly accessing and reviewing your latest interactions, without having to manually sift through your comment history.
select created_utc, permalink, bodyfrom reddit_my_saved_commentorder by created_utc desclimit 5;
select created_utc, permalink, bodyfrom reddit_my_saved_commentorder by created_utc desclimit 5;
List top five comments by score
Discover the highest-rated comments from your saved Reddit comments. This can help you quickly identify popular opinions or trending topics within your saved content.
select score, permalink, body, repliesfrom reddit_my_saved_commentorder by score desclimit 5;
select score, permalink, body, repliesfrom reddit_my_saved_commentorder by score desclimit 5;
List comments by subreddit
Explore which subreddits your saved comments are most frequently associated with to understand your engagement patterns across different communities.
select subreddit_name_prefixed, count(*)from reddit_my_saved_commentgroup by subreddit_name_prefixedorder by count desc;
select subreddit_name_prefixed, count(*)from reddit_my_saved_commentgroup by subreddit_name_prefixedorder by count(*) desc;
List comments that contain the word "docs"
Explore comments that include the term 'docs'. This can be useful to identify discussions or references related to documentation, aiding in information gathering and community engagement.
select created_utc, permalink, bodyfrom reddit_my_saved_commentwhere body ilike '%docs%'order by created_utc;
select created_utc, permalink, bodyfrom reddit_my_saved_commentwhere body like '%docs%'order by created_utc;
Schema for reddit_my_saved_comment
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
author | text | Author of the comment. | |
author_flair_id | text | ID of the flair template of the author for the comment. | |
author_flair_text | text | Flair text of the author for the comment. | |
author_id | text | Full name of the author for the comment. | |
body | text | Body of the comment. | |
can_gild | boolean | Indicates whether the comment can be gilded or not. | |
comment_replies | jsonb | Replies to the comment. | |
controversiality | bigint | Controversiality score of the comment. | |
created | timestamp with time zone | Time when the comment was created. | |
edited | timestamp with time zone | Time when the comment was edited. | |
full_id | text | Slug (full ID) of the comment. | |
id | text | ID of the comment. | |
is_submitter | boolean | True if the comment is a spoiler. | |
likes | boolean | True if you've upvoted the comment. False if you've downvoted it. Otherwise null. | |
locked | boolean | True if the comment is locked. | |
nsfw | boolean | True if the comment is not safe for work (over 18). | |
parent_id | text | Permalink (path only) to the comment. | |
permalink | text | Permalink (path only) to the comment. | |
post_author | text | Author of the post. | |
post_id | text | ID of the post this comment is from. | |
post_num_comments | bigint | Number of comments for the post. | |
post_permalink | text | Permanlink of the post. | |
post_title | text | Title of the post. | |
rank | bigint | Rank of the comment among the result rows, use for sorting. | |
saved | boolean | True if the comment has been saved. | |
score | bigint | Score of the comment. | |
score_hidden | boolean | True if the score is hidden on this comment. | |
stickied | boolean | True if the comment has been stickied. | |
subreddit_id | text | ID of the subreddit. | |
subreddit_name | text | Name of the subreddit, e.g. aws. | |
subreddit_name_prefixed | text | Prefixed name of the subreddit, e.g. /r/aws. |
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)" -- reddit
You can pass the configuration to the command with the --config
argument:
steampipe_export_reddit --config '<your_config>' reddit_my_saved_comment