Project:SPARQL/examples: Difference between revisions

add food items with FoodOn id query
(add food items with FoodOn id query)
Line 12: Line 12:
   }
   }
</SPARQL>
</SPARQL>
==WikiFCD federated query for food items with foodOn id and NALT id==
==WikiFCD federated query for food items with foodOn id and NALT id==
<SPARQL>
<SPARQL>
Line 30: Line 31:
     ?wikidata wdt:P2004 ?nalt  
     ?wikidata wdt:P2004 ?nalt  
   }}
   }}
</SPARQL>
==WikiFCD food items with FoodOn identifier==
<SPARQL>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wbt: <https://wikifcd.wikibase.cloud/prop/direct/>
PREFIX wb: <https://wikifcd.wikibase.cloud/entity/>
SELECT DISTINCT ?food ?foodLabel ?foodon WHERE {
  ?food wbt:P309 ?foodon;
    rdfs:label ?foodLabel.
}
</SPARQL>
</SPARQL>