This function returns the statistics about a band of a raster object in JSON format. If the band does not have statistics, the function returns null.


text ST_Statistics(raster raster_obj, integer band);


Parameter Description
raster_obj The raster object.
band The sequence number of the band, which starts from 0.


select ST_Statistics(raster_obj, 0) from raster_table where id=1;

'{    "min" : 0.00, "max" : 255.00,"mean" : 125.00,"std" : 23.123,"approx" : false}'