SELECT XMLElement("Country",
        XMLAttributes(country AS car_code),
        XMLElement("NoOfCities", count(*)),
        XMLAgg(XMLElement("city",name)
                           ORDER by population))
FROM city
GROUP BY country;
\end{verbatim}
