SQL queries for radacct