I already followed [this](https://stackoverflow.com/questions/39657449/remove-specific-value-from-firebase-database). But unfortunately, when I delete a data with the SAME value as the other, it gets deleted as well. I want to be deleting a single data only.

Here is my database structure. [![Here is my database](https://i.stack.imgur.com/pSsM0.png)](https://i.stack.imgur.com/pSsM0.png).

I want to be only deleting only a single value.

```
Query query = databaseReference.orderByChild("address").equalTo(tvPatientAddress.getText().toString());

                        query.addChildEventListener(new ChildEventListener() {
                            @Override
                            public void onChildAdded(DataSnapshot dataSnapshot, String s) {
                                dataSnapshot.getRef().setValue(null);
                            }

                            @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) {

                            }
                        });

```

I have this code

**Any chance you guys have an idea? I think the best way to do this is by getting the ID of the patient and deleting that data, since the ID is unique. Any help appreciated!**