Project:SPARQL/examples: Difference between revisions

Jump to navigation Jump to search
Line 133: Line 133:
}}
}}
GROUP BY ?food ?foodLabel ?taxon ?value
GROUP BY ?food ?foodLabel ?taxon ?value
</SPARQL>
==Food Items with SMILING Cambodia Food Code and Reference==
<SPARQL>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wbt: <https://wikifcd.wikibase.cloud/prop/direct/>
PREFIX wb: <https://wikifcd.wikibase.cloud/entity/>
PREFIX p: <https://wikifcd.wikibase.cloud/prop/>
PREFIX pr: <https://wikifcd.wikibase.cloud/prop/reference/>
PREFIX prov: <http://www.w3.org/ns/prov#>
SELECT ?food ?foodLabel ?code WHERE {
?food wbt:P313 ?code;
  p:P313 [ prov:wasDerivedFrom [pr:P62 wb:Q128052]].
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
</SPARQL>
</SPARQL>

Navigation menu