Updated Categorization Query to include a temp table approach that does the category reproduction for me