I am trying to figure out how to write an execute sql statement to leave out 1 type of data. The data I am attempting to grab is the top five of one column but one of the top fives = NA. I would like the top 6 minus the NAs which would essentially be the top five.
Let ( [ m = Month ( Get ( CurrentDate ) ) - 1 ;
m = If ( m = 0 ; 12 ; m ) ;
y = Year ( Get ( CurrentDate ) ) - If ( m = 12 ; 1 )
SELECT COUNT (IncidentSummary_Software), IncidentSummary_Software
WHERE MONTH (Date_Created)=?
GROUP BY IncidentSummary_Software
ORDER BY 1 DESC
FETCH FIRST 6 ROWS ONLY"
;Char (9) & Char (9) ; "" ; m ) )