Complete the code to query Firestore for documents where the field 'status' equals 'active'.
query = firestore_client.collection('users').where('status', '==', [1])
The query filters documents where the 'status' field is exactly 'active'.
Complete the code to order Firestore query results by the 'createdAt' timestamp in descending order.
query = firestore_client.collection('orders').order_by('createdAt', [1])
Use 'desc' to order results from newest to oldest.
Fix the error in the Firestore query to filter documents where 'age' is greater than 18.
query = firestore_client.collection('users').where('age', [1], 18)
The '>' operator filters documents where 'age' is greater than 18.
Fill both blanks to create a Firestore composite index query filtering 'category' equals 'books' and ordering by 'price' ascending.
query = firestore_client.collection('products').where('category', '==', [1]).order_by('price', [2])
The query filters products in 'books' category and orders them by price from low to high.
Fill all three blanks to create a Firestore query that filters documents where 'status' is 'active', 'priority' is greater than 3, and orders by 'dueDate' descending.
query = firestore_client.collection('tasks').where('status', '==', [1]).where('priority', [2], 3).order_by('dueDate', [3])
This query finds tasks that are active, have priority above 3, and sorts them by due date from newest to oldest.