Limit the number of som_data rows returned by the database