<pre>>SELECT (ST_SummaryStats(..)).* FROM ...
>
>Should show you "labels" to better understand.</pre><br>Yes, thx, now it report me this:<br><br> count | sum | mean | stddev | min | max<br>-------+-----+------+--------+-----+-----<br> 10000 | 0 | 0 | 0 | 0 | 0<br>
10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br>
10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br> 10000 | 0 | 0 | 0 | 0 | 0<br>.....<br><br><pre>>I guess you could run aggregates on the single columns of the stats, like:
>
>WITH stats AS ( SELECT (ST_SummaryStats(..)).* FROM ... )
>SELECT sum(count) as count, sum(sum) ... FROM stats;<br><br>Thx , strk.<br><br></pre>Running this query<br><br>WITH stats AS ( <br> SELECT <br> (ST_SummaryStats(rast)).* <br> FROM<br> my_schema.my_table<br>)<br>
SELECT <br> sum(count) as count, <br> sum(sum) as sum,<br> avg(mean) as mean,<br> avg(stddev) as stddev,<br> min(min) as min,<br> max(max) as max<br>FROM <br> stats<br>;<br><br>I have the report I need.<br><br> count | sum | mean | stddev | min | max<br>
-----------+-----------+------------------+------------------+-----+-----<br> 164020000 | 620088072 | 3.78056378490428 | 2.01499851432122 | 0 | 245<br>(1 riga)<br><br clear="all"><pre>>I guess it could be useful to define an aggregate taking
>"SummaryStats" type in input so you could do something like:
>
>SELECT (ST_SummaryStatsAgg(ST_SummaryStats(xx))).* FROM myrast;<br><br>I guess it should better.<br><br></pre>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty āčėōų<br>-----------------<br><br>