User login report

User login report

Hi,

I like to modify the following query so that I can see who logged in the the web interface this year and last year  

"select al.name "Login ID", count(acs.session_id) "Num times logged in" from aaaaccsession acs left join aaaaccount a on acs.account_id=a.account_id left join aaalogin al on a.login_id=al.login_id where acs.opentime >= <from_lastmonth> and acs.opentime <= <to_lastmonth> group by al.name"

Can anyone help me with this?

Best regards,
Allistair