> "Matt Magoffin" <[EMAIL PROTECTED]> 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 count.
>
> Something involving xmlagg in the sub-query, perhaps
"Matt Magoffin" <[EMAIL PROTECTED]> 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 count.
Something involving xmlagg in the sub-query, perhaps? No time
> "Matt Magoffin" <[EMAIL PROTECTED]> writes:
>> Hello, I'm trying to write a query to return an XML document like
>>
>>
>>
>> ...
>>
>
> Something like this:
>
> regression=# select xmlelement(name root, xmlagg(x)) from
> regression-# (select xmlelement(name range, xmlattributes(string
"Matt Magoffin" <[EMAIL PROTECTED]> writes:
> Hello, I'm trying to write a query to return an XML document like
>
>
>
> ...
>
Something like this:
regression=# select xmlelement(name root, xmlagg(x)) from
regression-# (select xmlelement(name range, xmlattributes(string4, count(*)
as
Hello, I'm trying to write a query to return an XML document like
...
I started with
select xmlelement(name range, xmlattributes(m.range, count(s.id) as "count"))
from mb_sale s
inner join mb_lead m on m.sale_id = s.id
where
s.sale_date >= date('2007-08-01') and s.sale_date <=