[thelist] sql query for sum of timediff

Matt Warden mwarden at gmail.com
Thu Jun 1 18:41:31 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Canfield, Joel wrote:
>> select firstname, lastname, sum(timediff(endtime,starttime))
>> from presence
>> where starttime between '2006-05-31 0:00:00' and '2006-05-31 23:59:59'
>> group by firstname, lastname
> 
> this returns zero sums in places I know there to be data (names are
> unique)
> 
> still working on it


what do you get with this:

select firstname, lastname, timediff(endtime,starttime)
from presence
where starttime between '2006-05-31 0:00:00' and '2006-05-31 23:59:59'


- --
Matt Warden
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEf3srrI3LObhzHRMRAgZ7AKDOf5KacYgRJcNz1D+afGDL5duRKwCfZrzr
zblp01hY+ZEtAOeu/X1WBvE=
=ej5i
-----END PGP SIGNATURE-----



More information about the thelist mailing list