title: how can I have max dates to all values?
body: <p>I'm trying to get from a "queue" table the date values for each element</p>
  
  <p>from a table (only showing top 30)</p>
  
  <pre><code>element                     added                   processed
  order-confirmation          2013-07-03 14:12:02 2013-07-03 14:12:03
  virtual-product-splitter    2013-07-03 14:12:02 2013-07-03 14:12:07
  fraud-protect           2013-07-03 14:12:02 2013-07-03 14:12:11
  giftcard-creator            2013-07-03 14:12:02 2013-07-03 14:12:15
  code-dispatcher         2013-07-03 14:12:02 0001-01-01 00:00:00
  order-confirmation          2013-07-03 14:10:01 2013-07-03 14:10:02
  virtual-product-splitter    2013-07-03 14:10:01 2013-07-03 14:10:06
  fraud-protect           2013-07-03 14:10:01 2013-07-03 14:10:10
  giftcard-creator            2013-07-03 14:10:01 2013-07-03 14:10:14
  code-dispatcher         2013-07-03 14:10:01 2013-07-03 14:10:19
  order-confirmation          2013-07-03 14:08:01 2013-07-03 14:08:02
  virtual-product-splitter    2013-07-03 14:08:01 2013-07-03 14:08:05
  fraud-protect           2013-07-03 14:08:01 2013-07-03 14:08:09
  giftcard-creator            2013-07-03 14:08:01 2013-07-03 14:08:13
  code-dispatcher         2013-07-03 14:08:01 2013-07-03 14:08:18
  code-dispatcher         2013-07-03 14:06:02 2013-07-03 14:06:19
  order-confirmation          2013-07-03 14:06:01 2013-07-03 14:06:02
  virtual-product-splitter    2013-07-03 14:06:01 2013-07-03 14:06:06
  fraud-protect           2013-07-03 14:06:01 2013-07-03 14:06:10
  giftcard-creator            2013-07-03 14:06:01 2013-07-03 14:06:14
  order-confirmation          2013-07-03 14:04:02 2013-07-03 14:04:03
  virtual-product-splitter    2013-07-03 14:04:02 2013-07-03 14:04:07
  fraud-protect           2013-07-03 14:04:02 2013-07-03 14:04:11
  giftcard-creator            2013-07-03 14:04:02 2013-07-03 14:04:15
  code-dispatcher         2013-07-03 14:04:02 2013-07-03 14:04:19
  order-confirmation          2013-07-03 14:02:01 2013-07-03 14:02:03
  virtual-product-splitter    2013-07-03 14:02:01 2013-07-03 14:02:06
  fraud-protect           2013-07-03 14:02:01 2013-07-03 14:02:10
  giftcard-creator            2013-07-03 14:02:01 2013-07-03 14:02:14
  code-dispatcher         2013-07-03 14:02:01 2013-07-03 14:02:19
  </code></pre>
  
  <p>doing</p>
  
  <p><code>select distinct element from sr_queue</code> I get</p>
  
  <pre><code>'c5-code-integration'
  'c5-debitor-integration'
  'c5-order-integration'
  'c5-product-integration'
  'code-dispatcher'
  'fraud-protect'
  'giftcard-creator'
  'order-confirmation'
  'packaged-confirmation'
  'virtual-product-splitter'
  </code></pre>
  
  <p>and I'm trying to attach the max date (as there's several) to each element, but doing</p>
  
  <pre><code>select element, max(added), processed
  from sr_queue 
  where element in (
     'c5-code-integration',
     'c5-debitor-integration',
     'c5-order-integration',
     'c5-product-integration',
     'code-dispatcher',
     'fraud-protect',
     'giftcard-creator',
     'order-confirmation',
     'packaged-confirmation',
     'virtual-product-splitter')
  </code></pre>
  
  <p>how should I create the selection?</p>
  
  <p>so I can get:</p>
  
  <pre><code>order-confirmation          2013-07-03 14:12:02 2013-07-03 14:12:03
  virtual-product-splitter    2013-07-03 14:12:02 2013-07-03 14:12:07
  fraud-protect               2013-07-03 14:12:02 2013-07-03 14:12:11
  giftcard-creator            2013-07-03 14:12:02 2013-07-03 14:12:15
  code-dispatcher             2013-07-03 14:12:02 0001-01-01 00:00:00
  c5-code-integration         2013-07-03 14:12:02 2013-07-03 14:12:15
  ...
  </code></pre>
  
  <p>I'm completely blanked after 3 days working on code :(</p>