Skip to content

docs: add dynamic date range filtering examples to WHERE clause #6278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

MeelahMe
Copy link
Contributor

@MeelahMe MeelahMe commented Aug 1, 2025

Closes #4852

  • Add "Filter data by dynamic date ranges" section with three practical examples
  • Include yesterday, last 24 hours, and current week filtering patterns
  • Use NOW(), DATE_TRUNC(), and INTERVAL functions for relative time periods
  • Add query explanations in expandable sections for clarity

@MeelahMe MeelahMe requested a review from Copilot August 1, 2025 00:41
Copilot

This comment was marked as outdated.

@MeelahMe MeelahMe requested a review from Copilot August 1, 2025 05:30
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation for dynamic date range filtering in SQL WHERE clauses, providing practical examples for querying time-series data with relative time periods. The addition helps users understand how to create queries that automatically adjust based on the current time.

Key changes:

  • Adds three new examples for dynamic date filtering: yesterday, last 24 hours, and current week
  • Incorporates SQL time functions like NOW(), DATE_TRUNC(), and INTERVAL for relative time calculations
  • Includes explanatory content in expandable sections to clarify the logic behind each query

@MeelahMe MeelahMe self-assigned this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL docs are missing examples of filtering by dynamic date ranges
1 participant