IC - updated sql with visual column