"Matt Magoffin" <postgresql.org@xxxxxxx> writes: > Thanks very much, that helps. Now I'm wondering if it's also possible to > then fill in another nested element level in the XML output, from the rows > that are aggregated into the <range> count. Something involving xmlagg in the sub-query, perhaps? No time to experiment with it now. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/