Changed query to get queue info.