Assume that I have the following structure in my Firebase Realtime database:
- users
  - g123
    - john
      - age: 30
      - active: 1
    - mike
      - age: 20
      - active: 0
    - johanna
      - age: 30
      - active: 1
  - g456
    - jake
      - age: 20
      - active: 1
    - maria
      - age: 20
      - active: 0
  - g789
    - elli
      - age: 20
      - active: 0
    - joe
      - age: 20
      - active: 0
I need to get the list of child:s where there is at least 1 user with active set to 1.
So, in the example above, there are 2 active users in g123 and 1 active user in g456. And there is no active user in g789.
How do I build a query to Firebase Realtime database (preferably with Python) that will return g123 and g456?
 
    