Complete the code to query all users with the name 'Alice' using filter_by.
users = User.query.[1](name='Alice').all()
The filter_by method allows filtering by keyword arguments like name='Alice'.
Complete the code to query users whose age is greater than 30 using filter.
users = User.query.[1](User.age > 30).all()
The filter method accepts expressions like User.age > 30 for filtering.
Fix the error in the code to query users with email ending with '@example.com'.
users = User.query.[1](User.email.like('%@example.com')).all()
Use filter with the like expression to filter by pattern.
Fill both blanks to query users with age less than 25 and name 'Bob'.
users = User.query.[1](User.age [2] 25, User.name == 'Bob').all()
Use filter with multiple expressions: User.age < 25 and User.name == 'Bob'. The operator for less than is <.
Fill all three blanks to query users with name starting with 'A', age greater than 20, and order by age descending.
users = User.query.[1](User.name.like('A%'), User.age [2] 20).[3](User.age.desc()).all()
Use filter for expressions, the greater than operator >, and order_by to sort results.