Bird
0
0

Given a Firestore document with fields {"score": 85, "passed": true}, what will be the result of querying documents where "score" > 80?

medium📝 Predict Output Q4 of 15
GCP - Cloud Firestore and Bigtable
Given a Firestore document with fields {"score": 85, "passed": true}, what will be the result of querying documents where "score" > 80?
AThe document will be included in the query results
BThe document will be excluded because 'passed' is true
CThe query will return an error due to incorrect syntax
DThe document will be included only if 'passed' is false
Step-by-Step Solution
Solution:
  1. Step 1: Analyze query condition

    The query filters documents where "score" is greater than 80.
  2. Step 2: Check document field values

    The document has "score" = 85, which satisfies the condition, so it is included.
  3. Final Answer:

    The document will be included in the query results -> Option A
  4. Quick Check:

    Query filters by score > 80 = document included [OK]
Quick Trick: Query filters by field condition only, ignore unrelated fields [OK]
Common Mistakes:
  • Assuming other fields affect the query
  • Thinking query syntax is wrong
  • Confusing true/false conditions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes