Time Count Mysql

0

I have a table where it counts the client connections time in freeradios , every time the client enters or exits the network it registers. I would like your help to know how much time each user navigated per day differently in MySQL.

EX:

fulanoA: 1000
FulanoB: 1728
FulanoC: 12

The table is as follows

CREATE TABLE 'radacct'
  'username' varchar(64) NOT NULL DEFAULT '',
  'acctsessiontime' int(12) UNSIGNED DEFAULT NULL,
)
    
asked by anonymous 11.07.2017 / 02:10

1 answer

2
Select username, Sum(acctsessiontime) as tempo_logado from radacct Group By username

So you will have a listing per user, how many seconds it has been.

    
11.07.2017 / 12:56