Я пытался использовать функции 'group by' и 'order by', используя следующий код, но выводит сообщение об ошибке
create table COUNTRY_XML(
C_X sys.xmltype);
declare
cursor mycursor is select country,continental,population2019 from countries;
c_x sys.xmltype;
begin
for i in mycursor
loop
select xmlelement("country_info",
xmlforest(i.country as "country", i.continental as "continental", i.population2019 as "population2019")) into c_x from dual;
insert into country_xml values(c_x);
end loop;
end;
select c.c_x.extract('/country_info/continental').getstringval(), sum(c.c_x.extract('/country_info/population2019').getstringval()) from
country_xml c group by c.c_x.extract('/country_info/continental') order by c.c_x.extract('/country_info/continental')
ORA-22950: невозможно ORDER объекты без MAP или метод ORDER 22950. 00000 - «невозможно ЗАКАЗАТЬ объекты без MAP или метода ORDER» * Причина: для типа объекта должен быть определен метод MAP или ORDER для всех сравнений, кроме сравнений на равенство и неравенство. * Действие: определить метод MAP или ORDER для типа объекта