Project:SPARQL/examples: Difference between revisions

From T-rex Taxonomy
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


<sparql tryit="1" list="1">
<sparql tryit="1" list="1">
#defaultView:Map
PREFIX wbt: <http://trex-taxonomy.wiki.opencura.com/prop/direct/>
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
   
   
SELECT * WHERE {
SELECT DISTINCT ?class ?classLabel (COUNT(?class) AS ?counts) WHERE {
   ?item wbt:P1 ?class ;
   ?item wbt:P1 ?class .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }   
}
}
GROUP BY ?class ?classLabel
</sparql>
</sparql>

Revision as of 12:32, 14 September 2020