Write me SQL code to compute reach of Reddit Posts in the last 30 days using BigQuery
- User
Write me SQL code to compute reach of Reddit Posts in the last 30 days using BigQuery
Assistant
To compute the reach of Reddit posts in the last 30 days using BigQuery, you can use the following SQL code:
SELECT subreddit, title, author, created_utc, upvotes, downvotes, comments_count FROM reddit_posts WHERE created_utc >= DATE(NOW()) - INTERVAL 30 DAY ORDER BY upvotes DESC LIMIT 1000This code assumes you have a table named
reddit_postscontaining the following columns:subreddit: The subreddit where the post was published.title: The title of the post.author: The username of the post author.created_utc: The timestamp when the post was created.upvotes: The number of upvotes the post received.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.