[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MAX Query


MAX() Query

Hello,

I'm trying to write 2 queries, the first to find the most recent club a
player has played for, and then the previous club they played for.

To find the most recent club i use this :
substring(max(concat(STARTDATE,TEAM)),11,100) as TEAM

which concats a players start date to the Team name, finds the Max and then
strips off the date (possibly a better way but i'm not sure).

I was wondering if its possible to do a MAX -1 or something, and if so,
where to put it in the above example.

Any suggestions most welcome

Ben.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread78163@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.