Question: This is my Firebase structure:

```
"Braccianti" : {
        "-KehahFy7z2IrUdchwxk" : {
          "Associazione" : "-KehahFy7z4ngUdchwxk",
          "Cellulare" : "3402659753",
          "Cognome" : "Prova",
          "DataDiNascita" : "12/04/1985",
          "Nome" : "Bracciante"
        },
        "ashaosdfao" : {
          "Associazione" : "gsdfskjdfsdf",
          "Cellulare" : 234235246,
          "Cognome" : "Example",
          "DataDiNascita" : "10/12/2000",
          "Nome" : "exam"
        }
        "dfsdfsdfsdf" : {
          "Associazione" : "ewsvbdtgsdgf",
          "Cellulare" : 23523975553,
          "Cognome" : "Ex",
          "DataDiNascita" : "17/01/1994",
          "Nome" : "ghjghj"
        }
      }

```

I'd like to get "dfsdfsdfsdf" and "-KehahFy7z2IrUdchwxk" with a single query, so i thought about doing like this:

```
 Query QueryAssociazioni = FirebaseDatabase.getInstance().getReference("Aziende/"+main.getNomeAzienda()+"/Associazioni"); 
QueryAssociazioni = QueryAssociazioni.equalTo("dfsdfsdfsdf").equalTo("-KehahFy7z2IrUdchwxk");

```

But it doesn't work.

How can i solve my problem?

Answer: 
Firebase doesn't allow multiple queries, but you can always add a ChildEventListener and check if the child's value :

```
QueryAssociazioni.addChildEventListener(new ChildEventListener() {
    @Override
    public void onChildAdded(DataSnapshot dataSnapshot, String s) {
        String child = dataSnapshot.getValue().toString();
        if(child.equals("dfsdfsdfsdf") || child.equals(("-KehahFy7z2IrUdchwxk"))){
            //Do something with the value
        }
    }

    @Override
    public void onChildChanged(DataSnapshot dataSnapshot, String s) {

    }

    @Override
    public void onChildRemoved(DataSnapshot dataSnapshot) {

    }

    @Override
    public void onChildMoved(DataSnapshot dataSnapshot, String s) {

    }

    @Override
    public void onCancelled(DatabaseError databaseError) {

    }
});

```
```
QueryAssociazioni.child("Braccianti")
.orderByChild("Associazione") //key name
.equalTo("Associazione")  //value

```

Try this way...
Thanks.