title: DBIx::Class select from a subquery
body: <p>I'm trying to write the following SQL query using DBIx::Class:</p>
  
  <pre><code>SELECT * FROM (SELECT username, DENSE_RANK () OVER (ORDER BY COUNT(username) DESC) FROM myTable GROUP BY username) AS topUsers WHERE username='myUsername';
  </code></pre>
  
  <p><code>myTable</code> consists of only two rows, one being the username and the other one representing an achievement of the user. The subquery is supposed to assign a rank to each user and the main query selects the rank of <code>myUser</code>.</p>
  
  <p>I'm having some issues in translating this to DBIx::Class so I would appreciate some help!</p>
  
  <p>Thank you in advance!</p>