human
334) Show buildings that have 3 addresses, each referencing geometry with 'LINESTRING' or 'POLYGON'.
gpt
```sparql
PREFIX geo:<http://www.opengis.net/ont/geosparql#>
PREFIX :   <http://example.org/ontology#>

SELECT ?b
WHERE {
  ?b a :Building ;
     :hasAddress ?a1, ?a2, ?a3 .
  ?a1 :hasGeometry ?g1 . ?g1 geo:asWKT ?w1 .
  ?a2 :hasGeometry ?g2 . ?g2 geo:asWKT ?w2 .
  ?a3 :hasGeometry ?g3 . ?g3 geo:asWKT ?w3 .
  FILTER((regex(?w1, "LINESTRING|POLYGON", "i")) &&
         (regex(?w2, "LINESTRING|POLYGON", "i")) &&
         (regex(?w3, "LINESTRING|POLYGON", "i")))
}
```