added sql for user types