Updating query for Icehouse