Dealing with query blocks without tables (e.g. in queries containing union)