[thelist] SQL Query

Jack Timmons jorachim at gmail.com
Tue Jun 8 12:10:50 CDT 2010


On Tue, Jun 8, 2010 at 12:06 PM, Christopher Marsh
<Christopher.Marsh at akqa.com> wrote:
> Would the following satisfy your criteria?
>
> SELECT MAX(paid_on),
> id
> FROM charges
> GROUP BY id

It does for the explanation I gave, except I missed out a vital part
that you'd have only figured out if you could see through the blood in
your eyes after looking at my query.

Each charge has a related amount. I need the most recent charge,
because I have to perform logic against the amount back.

-- 
-Jack Timmons
Blog: http://www.codeacula.com
Sandbox: http://www.trotlc.com
Twitter: @codeacula
Google Chat: Figure it out. C'mon, seriously.


More information about the thelist mailing list