On 6/22/2012 12:18 AM, Anupam Karmarkar wrote:
Thanks Rick for your reply,
Here i am asking about logic to perpare query or whole query itself.
A set-based approach to doing the basic task is to convert your set of
start/stop times into duration values. The timediff() function mentioned
alr
Thanks Rick for your reply,
Here i am asking about logic to perpare query or whole query itself.
--Anupam
From: Rick James
To: Anupam Karmarkar ; "mysql@lists.mysql.com"
Sent: Wednesday, 20 June 2012 10:52 PM
Subject: RE: Need Query H
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timediff
and SEC_TO_TIME()/3600
> -Original Message-
> From: Anupam Karmarkar [mailto:sb_akarmar...@yahoo.com]
> Sent: Wednesday, June 20, 2012 2:39 AM
> To: mysql@lists.mysql.com
> Subject: Need Query Help
>
> H
Hi,
You need to self-join payhistory along the lines of
select p1.* from payhistory p1, payhistory.p2 where
p1.payid = p2.payid and p1.paydate = max(p2.paydate)
Something like that, anyway - I know I had to fiddle around a bit to get a
similar think going.
Hope this help
Quentin
-Origina