WITH
--один запрос
SINGLE_QUERY AS
( SELECT '0001' AS GROUP_ID, 'Moscow' AS V1, 1300 AS V2 FROM DUAL
UNION ALL
SELECT '0001' AS GROUP_ID, 'London' AS V1, 900 AS V2 FROM DUAL
UNION ALL
SELECT '0001' AS GROUP_ID, 'New York' AS V1, 1600 AS V2 FROM DUAL
UNION ALL
SELECT '0001' AS GROUP_ID, 'Berlin' AS V1, 1000 AS V2 FROM DUAL
),
--список групп
GROUPS AS
( SELECT TO_CHAR(LEVEL,'0009') GROUP_ID FROM DUAL CONNECT BY LEVEL<=99
)
--для проверки
--select group_id, v1, v2 from single_query;
--select group_id from groups;
--результат
SELECT GROUPS.GROUP_ID,
SINGLE_QUERY.V1,
SINGLE_QUERY.V2
FROM SINGLE_QUERY,
GROUPS
ORDER BY 1;