Implemented and used a function to limit a factor to a specified top number of levels (by count) of the original factor. By default, sort factor levels by frequency of levels in descending order. Increased number of rows for the Project License SQL query to test factors with more levels.