title: Rank() with PhpMyAdmin
body: <p>I'm trying to calculate some data but I need the RANK() function. Sadly, PhpMyAdmin doesn't have it.</p>
  
  <p>This is the Model
  <a href="https://i.stack.imgur.com/G08lN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G08lN.png" alt="Model"></a></p>
  
  <p>And this is how the query should be</p>
  
  <p><code>SELECT bom.bom_id, RANK() OVER (PARTITION BY earlier_bom.bom_id ORDER BY bom.bom_id) AS pathIndex FROM bom RIGHT JOIN earlier_bom WHERE [condition]</code></p>
  
  <p>Using this example I should get the PathIndex column. </p>
  
  <p>I already got the Depth and Parent ID, but I can't get the index, so if you know another option to create a query similar to rank function it would be apreciated!</p>
  
  <p><a href="https://i.stack.imgur.com/Vc0vS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vc0vS.png" alt="Example"></a></p>
  
  <p><a href="https://i.stack.imgur.com/BMylU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BMylU.png" alt="Result"></a></p>