SQL multiple occurrences of same variables and max function
<p>Here is my table</p>

<pre><code>serial Number   Job Date
            1   12/12/2013
            1    1/2/2014
            1    2/23/2010
            1    3/15/2010
            2    11/11/2012
            2    6/5/2011
            2    1/23/2010
</code></pre>

<p>I want only serial number which have job date older that 12/31/2013, in the above table it should be only the serial number 2 and the latest job date which is 11/11/2012</p>

<p>The result table should be</p>

<p>serial Number   Job Date</p>

<p>2              11/11/2012</p>

<p>@ohho </p>

<p>using where will not work since it will also display the row,</p>

<p>Serial_number    Job Date</p>

<p>1                          12/12/2013</p>

<p>2                           11/11/2012</p>

<p>select serial_number, max(job_date) from computers </p>

<p>where job_date &lt; '2013-12-31'</p>

<p>Group by serial_number</p>