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
Sure! Here's an example SQL code to compute the reach of Reddit posts in the last 30 days using BigQuery:
codeSELECT subreddit, COUNT(DISTINCT author) AS unique_authors, COUNT(*) AS total_posts FROM `your_dataset.your_table` WHERE TIMESTAMP_TRUNC(TIMESTAMP_SECONDS(created_utc), DAY) >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY) GROUP BY subreddit ORDER BY total_posts DESC;In this code, you'll need to replace with the actual dataset and table name where your Reddit posts data is stored.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.