[TASK] replace all old query_alias calls with query