Bird
0
0

Which of the following is the correct syntax to filter AWS billing data for the last 30 days in a query?

easy📝 Conceptual Q3 of 15
AWS - Account and Billing
Which of the following is the correct syntax to filter AWS billing data for the last 30 days in a query?
ASELECT * FROM billing WHERE date = LAST30
BFILTER billing_date LAST 30 DAYS
Cbilling_date BETWEEN NOW() AND NOW() - 30
DWHERE billing_date >= CURRENT_DATE - INTERVAL '30' DAY
Step-by-Step Solution
Solution:
  1. Step 1: Understand standard SQL date filtering syntax

    Correct syntax uses WHERE with date comparison and interval.
  2. Step 2: Evaluate each option

    WHERE billing_date >= CURRENT_DATE - INTERVAL '30' DAY uses valid SQL syntax; others are invalid or incorrect.
  3. Final Answer:

    WHERE billing_date >= CURRENT_DATE - INTERVAL '30' DAY -> Option D
  4. Quick Check:

    Correct date filter syntax = WHERE billing_date >= CURRENT_DATE - INTERVAL '30' DAY [OK]
Quick Trick: Use WHERE with INTERVAL for date filters in SQL [OK]
Common Mistakes:
  • Using non-standard keywords like FILTER
  • Incorrect date range expressions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes