1,482
edits
Line 82: | Line 82: | ||
select ?author ?lastname ?authorLabel (group_concat(distinct concat(str(?lemma)," (",str(?count),")");SEPARATOR=", ") as ?terms) # (count(?bib_item) as ?in_how_many_articles) (lang(?lemma) as ?lang) | select ?author ?lastname ?authorLabel (group_concat(distinct ?lang;SEPARATOR=", ") as ?language) (group_concat(distinct concat(str(?lemma)," (",str(?count),")");SEPARATOR=", ") as ?terms) # (count(?bib_item) as ?in_how_many_articles) (lang(?lemma) as ?lang) | ||
where { | where { | ||
?author endp:P52 ?lastname. | ?author endp:P52 ?lastname. | ||
{ SELECT ?author ?lemma (count(?bib_item) as ?count) | { SELECT ?author ?lang ?lemma (count(?bib_item) as ?count) | ||
where { | where { | ||
?bib_item endp:P40 ?author. | ?bib_item endp:P40 ?author; endp:P7 [rdfs:label ?lang]. filter (lang(?lang)="en") | ||
?bib_item endp:P65 [wikibase:lemma ?lemma]. | ?bib_item endp:P65 [wikibase:lemma ?lemma]. | ||
} group by ?author ?lemma ?count order by ?count desc(lcase(str(?lemma))) | } group by ?author ?lang ?lemma ?count order by ?count desc(lcase(str(?lemma))) | ||
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,pt". } | } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,pt". } | ||
} group by ?author ?lastname ?authorLabel ?terms order by ?lastname | } group by ?author ?lastname ?authorLabel ?langauge ?terms order by ?lastname | ||
</sparql> | </sparql> | ||