Bird
0
0

What will be the output of this InfluxDB query?

medium📝 Predict Output Q5 of 15
Raspberry Pi - Data Logging and Databases
What will be the output of this InfluxDB query?
SELECT last("humidity") FROM "sensor_data" WHERE time > now() - 30m
AThe oldest humidity value in the last 30 minutes
BThe most recent humidity value in the last 30 minutes
CAll humidity values recorded in the last 30 minutes
DThe average humidity value in the last 30 minutes
Step-by-Step Solution
Solution:
  1. Step 1: Understand the last() function

    last() returns the most recent value for the specified field.
  2. Step 2: Analyze the time filter

    It limits data to the last 30 minutes.
  3. Final Answer:

    The most recent humidity value in the last 30 minutes -> Option B
  4. Quick Check:

    last() = most recent value [OK]
Quick Trick: last() fetches the newest data point [OK]
Common Mistakes:
MISTAKES
  • Confusing last() with first()
  • Assuming it returns all values
  • Mixing last() with average

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes