query-dd48ddb67e16e2ddfca3d3c92de2c2ca

rq turtle/ttl

Items with either of two property statementsHello, . excluded, items that lack both of those two properties shall be included statement. Items that have statements with both statements (FIPS and GNIS statement) shall be (P590)GNIS Feature ID or (P774)FIPS 55-3 (locations in the US) that have either a (Q759)New Hampshire I would like to have a query that returns all items located in with this either-or-both construction? Thanks a lot in advance. (P590)GNIS Feature ID statement - easy. But how to extend to the (P744)asteroid family I currently have the following query that gives me all such items that have a

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?place ?placeLabel ?fips
WHERE
{
  ?place wdt:P131* wd:Q759 .
  ?place wdt:P774 ?fips
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?place ?placeLabel  ?fips
ORDER BY ASC(?placeLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?fips"):::projected v2("?place"):::projected v1("?placeLabel"):::projected c5(["bd:serviceParam"]):::iri c7(["en"]):::literal c2(["wd:Q759"]):::iri v2 --"wdt:P131"--> c2 v2 --"wdt:P774"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end