Firebase - How do I write multiple orderByChild for extracting data?

You can only use one ordering method.

To query more, you'll need to rethink your data structure. Your current structure probably looks something like this:

{
  "key": {
     "id_1": {
        "userUid": "user_1",
        "jobId": "job_1"
     },
     "id_2": {
        "userUid": "user_1",
        "jobId": "job_2"
     },
     "id_3": {
        "userUid": "user_2",
        "jobId": "job_3"
     }
  }
}

With this structure you're limited to index off of one child key.

Now consider this structure:

{
   "key": {
      "user_1": {
         "id_1": {
            "jobId": "job_1",
            "userUid": "user_1"
         },
         "id_2": {
            "jobId": "job_2",
            "userUid": "user_1"
         }
      }
      "user_2": {
         "id_3": {
            "jobId": "job_3",
            "userUid": "user_2"
         }
      }
   }
}

This structure explicitly creates an index on uid. So now if you want to get all the jobs by user you can write this query:

var ref = new Firebase('<my-firebase-app>');
var uid = 'user_1';
var userRef = ref.child('key').child(uid);
var query = userRef.orderByChild('jobId');
query.on('value', (snap) => console.log(snap.val());

An other way to do kind of multiple orderByChild in Firebase is to create an orderKey.

Imagine you have this in your base:

{
    userId: {
        firstName: 'Jon',
        lastName: 'Snow',
        birthYear: 283
    }
}

And you want to query: userRef.orderByChild('firstName').equalTo('Jon').orderByChild('lastName').equalTo('Snow')

You need to create a key on your user like this:

{
    userId: {
        firstName: 'Snow',
        lastName: 'Jon',
        birthYear: 283,
        orderName: 'JonSnow'
    }
}

So you can query like this: userRef.orderByChild('orderName').equalTo('JonSnow')

This also works with startAt and endAt if you want to query all the Snow born in a range of years. You first create the key:

{
    userId: {
        firstName: 'Snow',
        lastName: 'Jon',
        birthYear: 283,
        orderNameYear: 'Snow283'
    }
}

So you can query: userRef.orderByChild('orderNameYear').startAt('Snow280').endAt('Snow285')

This will return all Snow born between 280 and 285.