30. どうやったか?
select ?birthPlace (count(?s) as ?num) where{
?s a <http://dbpedia.org/ontology/Comedian>.
?s <http://dbpedia.org/ontology/birthPlace> ?Place.
?Place rdfs:label ?birthPlace.}
group by ?birthPlace ORDER BY DESC(?num) limit 10
とか
select ?birthPlace (count(?s) as ?num) where{
?s a <http://dbpedia.org/ontology/Comedian>.
?s <http://dbpedia.org/ontology/birthPlace> ?Place.
bind( substr(str(?Place), 32) as ?birthPlace) }
group by ?birthPlace ORDER BY DESC(?num) limit 10
SPARQLを少し勉強すればいろんなことができます!
32. 都道府県だけに…
select ?birthPlace (count(?s) as ?num) where{
?s a <http://dbpedia.org/ontology/Comedian>.
?s <http://dbpedia.org/ontology/birthPlace> ?Place.
?Place rdf:type <http://schema.org/Place>.
?Place rdfs:label ?birthPlace.}
group by ?birthPlace ORDER BY DESC(?num)