New Analysis causing fault on Database

I have downloaded a project off of exchange to hopefully display alarm data. However when doing so I noticed that the alarm data it read required display paths to tell what the alarm was. So I went into a new UDT that I created before this and added all 128 alarms that we have and gave them unique labels as well as display paths so that we could tell what they were. However when going past anything in our limit of 1 (which pulls the old alarms since they are declared unknown in the SQL)

SELECT TOP(:limit)
	a.priority,
	SUM(CASE WHEN c.eventtime IS NULL THEN 1 ELSE 0 END) active,
	SUM(CASE WHEN c.eventtime IS NULL THEN 0 ELSE 1 END) cleared,
	SUM(CASE WHEN k.eventtime IS NULL THEN 1 ELSE 0 END) unacknowledged,
	COUNT(*) total,
	AVG(CASE WHEN k.eventtime IS NULL THEN 0 
		ELSE DATEDIFF(s, a.eventtime, COALESCE(k.eventtime, CURRENT_TIMESTAMP)) END) acknowledgeTime,
	AVG(CASE WHEN c.eventtime IS NULL THEN 0 
		ELSE DATEDIFF(s, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP)) END) clearTime,
	SUM(DATEDIFF(s, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) totalTime
FROM
	alarm_events a
		LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
		LEFT JOIN alarm_events k ON k.eventid = a.eventid AND k.eventtype = 2
WHERE
	a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0 AND a.eventflags % 2 = 0
GROUP BY
	a.priority 
ORDER BY
	a.priority ASC

I get an error saying that the database is faulted, even when trying to run it through the named query instead of the script.

#expression binding in the perspective
runScript("exchange.alarm_analysis.alarm.alarmSummary"
	, {this.custom.pollRate}*1000
	, {this.custom.dbtype}
	, {./Filters/Start Date/Date.props.formattedValue}
	, {./Filters/End Date/Date.props.formattedValue}
	, {./Filters/Top/Numeric.props.value}
	)
#Script for the alarm summary in ignition project library
def alarmSummary(dbType, startDate, endDate, limit):
	""" 
		Return alarm summary data for ???.
		Args:
			startDate - Start range for dates to pull alarms from (datetime)
			endDate - End range for dates to pull alarms from (datetime)
			limit - Limit for number of alarms to pull (int)
		Returns:
			dataset of alarm journal data
	"""
	nQuery = QUERY_BASE.format(dbType, 'Alarm Summary')
	params = {'startDate': startDate, 'endDate': endDate, 'limit': limit}
	result = system.db.runNamedQuery(nQuery, params)
	return result

Can anyone think of a solution, my initial speculation was that because the alarms are newer than the selected date that it was throwing some type of error but I am unsure.

Link to downloaded exchange project Ignition Exchange | Inductive Automation