Pull Current Users from SQL

Sorry but I know very little about SQL queries.

Is there one I can run that at the time it is run will report back the # of current users? I am looking at importing this data into our network monitoring software.

do you want to pull current user (backup current user ) from openfire ?

No I want to pull the # of current active users on the server like what is displayed on this page stats-dashboard.jsp