Pull Alarms from a Named Query

Is it possible to pull the alarms to the alarm status table or alarm journal from a named query?
I want to be able to limit the alarms to the most recent 50 alarms. I could not find a way to do this except on the SQL side, which is what I did in my named query. Is it possible to pull that data to alarm tables?