Select all columns for each item's maximum date
<p>I have a table as such:</p>

<pre><code>_id INT AUTO_INCREMENT
itemID INT
price DECIMAL
priceDate DATETIME
</code></pre>

<p>Each itemID can have different prices set at different dates (so I can keep track of price changes in time)</p>

<p>However, I am perplexed as how to retrieve each item's current price while avoiding duplicates (that is, for each item, get all columns for each maximum date).</p>

<p>Some Sample Data:</p>

<pre><code>_id itemID price pricedate
1   1   50.00   2016-06-14 00:00:00
2   2   50.00   2016-06-14 00:00:00
3   3   85.00   2016-06-14 00:00:00
4   4   95.00   2016-06-14 00:00:00
...
120 1   1000.00 2016-08-11 12:41:13
</code></pre>

<p>Expected Output:</p>

<pre><code>_id itemID price pricedate
2   2   50.00   2016-06-14 00:00:00
3   3   85.00   2016-06-14 00:00:00
4   4   95.00   2016-06-14 00:00:00
120 1   1000.00 2016-08-11 12:41:13
</code></pre>

<p>note that itemID of 1 has two entries. Recently the price changed from 50 to 1000. I only want to display each item with their maximum pricedate</p>