LinguaLibre
Difference between revisions of "Stats/Languages"
< LinguaLibre:Stats
(over 60 % more performance with this query with identical results (~ 40 seconds -> 11-15 seconds)) |
|||
Line 28: | Line 28: | ||
</translate> | </translate> | ||
<query _pagination="10" lang="<translate> <!--T:11--> Item (Language Qid)</translate>" langLabel="<translate> <!--T:12--> Language</translate>" code="<translate> <!--T:13--> ISO 639-3 code</translate>" nb="<translate> <!--T:14--> Number of speakers</translate>"> | <query _pagination="10" lang="<translate> <!--T:11--> Item (Language Qid)</translate>" langLabel="<translate> <!--T:12--> Language</translate>" code="<translate> <!--T:13--> ISO 639-3 code</translate>" nb="<translate> <!--T:14--> Number of speakers</translate>"> | ||
− | SELECT ?lang ?langLabel ?code (COUNT(? | + | SELECT ?lang ?langLabel ?code ?videos ?signers |
+ | WHERE { | ||
+ | ?lang prop:P2 entity:Q4 ; # instance of (P2) is language (Q4) | ||
+ | prop:P24 entity:Q88890 .# of type (P24) hand signed (Q88890) | ||
+ | { | ||
+ | SELECT ?lang (COUNT(?record) as ?videos) | ||
+ | WHERE { | ||
+ | ?record prop:P4 ?lang ; # language (P4) is ?lang | ||
+ | prop:P2 entity:Q2 # instance of (P2) is record (Q2) | ||
+ | } GROUP BY ?lang | ||
+ | } | ||
+ | { | ||
+ | SELECT ?lang (COUNT(DISTINCT ?signer) as ?signers) | ||
+ | WHERE { | ||
+ | ?record prop:P4 ?lang ; # language (P4) is ?lang | ||
+ | prop:P5 ?signer. # instance of (P2) is speaker (Q3) | ||
+ | } GROUP BY ?lang | ||
+ | } | ||
+ | OPTIONAL { ?lang prop:P13 ?code } | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | ?lang rdfs:label ?langLabel . | ||
+ | } | ||
+ | } ORDER BY DESC(?videos) | ||
+ | </query> | ||
− | + | ||
− | + | <translate> | |
− | + | == Signed languages by videos and speakers == | |
− | + | </translate> | |
− | + | <query _pagination="10" lang="<translate>Item (Language Qid)</translate>" langLabel="<translate> Language</translate>" code="<translate> ISO 639-3 code</translate>" videos="<translate> Number of videos</translate>"> signers="<translate> Number of signers</translate>"> | |
− | + | SELECT ?lang ?langLabel ?code ?videos ?signers | |
+ | WHERE { | ||
+ | ?lang prop:P2 entity:Q4 ; # instance of (P2) is language (Q4) | ||
+ | prop:P24 entity:Q88890 . # of type (P24) hand signed (Q88890) | ||
+ | { | ||
+ | SELECT ?lang (COUNT(?record) as ?videos) | ||
+ | WHERE { | ||
+ | ?record prop:P4 ?lang ; # language (P4) is ?lang | ||
+ | prop:P2 entity:Q2 # instance of (P2) is record (Q2) | ||
+ | } GROUP BY ?lang | ||
} | } | ||
− | + | { | |
− | + | SELECT ?lang (COUNT(DISTINCT ?signer) as ?signers) | |
− | + | WHERE { | |
+ | ?record prop:P4 ?lang ; # language (P4) is ?lang | ||
+ | prop:P5 ?signer. # instance of (P2) is speaker (Q3) | ||
+ | } GROUP BY ?lang | ||
+ | } | ||
+ | |||
OPTIONAL { ?lang prop:P13 ?code } | OPTIONAL { ?lang prop:P13 ?code } | ||
− | |||
SERVICE wikibase:label { | SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
?lang rdfs:label ?langLabel . | ?lang rdfs:label ?langLabel . | ||
} | } | ||
− | } | + | } ORDER BY DESC(?videos) |
− | ORDER BY DESC(? | ||
</query> | </query> | ||
Revision as of 09:59, 16 October 2023
Languages by number of recordings
Languages by number of speakers