sql - Count DateTime Stamp For Results -


i have table containing list of userids , datetime stamp when transaction carried out. looks following:

userid | stamp     john11| 01/01/2013 01:15:27 

i return query shows period of time how many transactions each user has done.

i have tried count due time part of stamp counts each individual millisecond rather overall.

thanks in advance

use time_to_sec function actual value.

select count(userid), userid table time_to_sec(stamp) between  fromtime , totime -- fromtime , totime interval period  

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -