title: mysql advanced group query
body: <p>I need some help figuring out a query</p>
  
  <p>I have 3 tables</p>
  
  <pre><code>sources
  id, name, rank
  
  origin
  id, source_id (FK to sources id), name
  
  One source can have many origins
  
  product
  id, origin_id (FK to origin id), name, time_added
  
  One origin can have many products
  </code></pre>
  
  <p>Now, what I want is to select the most recent products per source, ordered by rank descending</p>
  
  <p>Any suggestions?</p>