Update raw queries to support Versioned if appropriate