# previous reset period into the current period but
# involves more work for the SQL server than those
# below
-# query = "SELECT SUM(AcctSessionTime - \
-# GREATER((%b - AcctStartTime::ABSTIME::INT4), 0)) \
-# FROM radacct WHERE UserName='%{%k}' AND \
-# AcctStartTime::ABSTIME::INT4 + AcctSessionTime > '%b'"
+ query = "SELECT SUM(AcctSessionTime - \
+ GREATER((%b - AcctStartTime::ABSTIME::INT4), 0)) \
+ FROM radacct WHERE UserName='%{%k}' AND \
+ AcctStartTime::ABSTIME::INT4 + AcctSessionTime > '%b'"
# This query ignores calls that started in a previous
# reset period and continue into into this one. But it