Generates initial SQL for DB tables that require iterator type values