SQL queries updated to support new sub category