 <p>This may be a pretty simple answer but it really depends on how you structure your data.</p> <p>If there are exactly 100 users at all times and you want everyone from position 65 to position 1, thats easy.</p> <p>Likewise if you want what position user XYZ is, that's also easy.</p> <p>There's also ways to load the top 2 users by position (or 35)</p> <pre><code>users: user_id_0 position: 15 user_id_1 position: 32 user_id_2 position: 7 </code></pre> <p>then to a query on the /users/position sort by position and then queryLimitedToFirst(2) will return user_id_2 and user_id_0.</p> <p>Edit:</p> <p>Based on more data, here are a couple more options. Given we have 5 users, each with a score (I noted their 'position' in the list)</p> <pre><code>uid_0: 50 //pos 2 uid_1: 25 //pos 1 uid_2: 73 //pos 4 uid_3: 10 //pos 0 uid_4: 58 //pos 3 </code></pre> <p>If you want to know the position, based on score of uid_2 - I don't know your platform so I will give a generic flow:</p> <p>step 1) query uid_2 to get his score, 73, then</p> <p>step 2) queryOrderedByChild(score).startingAtValue(73), get nodes with scores from 73 to whatever the highest score is</p> <p>step 3) then the result will be in a snapshot, so check snapshot.childrenCount, which will be the position if uid_2, which is 4. This will reduce the number of nodes loaded.</p> <p>The downside is that the farther down the list, the more data would be loaded. If you only have 1000 nodes with just scores in them, that's not a lot of data.</p> <p>The following solution avoids lots of data but requires more work by the app.</p> <p>Of course, if your platform support array's this is a super simple task. Using the same structure above, load the children into and array and get the index number of the uid you want to know the position of.</p> <p>Swift code</p> <pre><code>let ref = self.myRootRef.childByAppendingPath("scores") ref.queryOrderedByValue().observeEventType(.Value, withBlock: { snapshot in var myArray = [String]() for child in snapshot.children { let key = child.key as String myArray.append(key) } let pos = myArray.indexOf("uid_0") print("postion = \(pos!)") }) </code></pre>