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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -