Fine! You know that
ST_Area returns the area of the polygon, but what happens if we use it with a collection? The answer is: it will return the total area of all polygons in the collection. For instance:
Well done! Now, you know that the
ST_Area function returns the area of a polygon, but what happens if we pass in a collection to this function? Simply put, it calculates the total area of all polygons in the collection! This simplifies matters quite a bit, eliminating the need to call an aggregate function like
SUM if you already have a collection on hand. For instance:
For each collection, the query above will show its
id and the total area of all polygons it contains.