Udpate the new SQL in the Phire model for multiple category selection