title: How to query Firebase Realtime database in Android ex. "SELECT column values FROM Table"
body: <p>I come from an SQL DB background, so i don't know if such query is possible using Firebase realtime DB.</p>
  
  <p>I have the following structure in my Firebase realtime DB. I am trying to find a way to construct a query by which I can get a list of countries where there is a "Service-provider" in. </p>
  
  <p>Using SQL, I would easily write this: SELECT DISTINCT Country FROM Address;</p>
  
  <p>I don't want to return all "service-provider" objects as there could be thousands of them! I only want a List of strings containing the countries, and preferably DISTINCT. </p>
  
  <p><strong>Example:</strong> if there are 3 Service-Providers in USA, 5 in Canada, and 4 in France, then my query would return ["USA","Canada",France"].</p>
  
  <pre><code>"Service-Providers" : {
      "PUSH_ID" : {
        "address" : {
          "area" : "ddd",
          "city" : "Berlin",
          "country" : "Germany",
          "lat" : 0,
          "lng" : 0
             },
        "description" : "Shop",
        "firstName" : "fn",
        "lastName" : "ln",
        "phoneNumbers" : [ "123" ],
        "serviceCategory" : "mixed",
        "uid" : "PUSH_ID"
      }
         -
         -
         -
         -
    }
  </code></pre>