|
|
Line 22: |
Line 22: |
| } | | } |
| </query> | | </query> |
− | <translate>
| |
− | == Monthly activity == <!--T:25-->
| |
− | </translate>
| |
| | | |
− | <query yearmonth="<translate><!--T:33--> Date</translate>" records="<translate><!--T:34--> New records</translate>" speakers="<translate><!--T:35--> Active speakers</translate>" languages="<translate><!--T:36--> Active languages</translate>">
| + | Subpages: |
− | SELECT
| + | * [[LinguaLibre:Stats/Users]] |
− | ?yearmonth
| + | * [[LinguaLibre:Stats/Languages]] |
− | (COUNT(DISTINCT ?record) AS ?records)
| |
− | (COUNT(DISTINCT ?speaker) AS ?speakers)
| |
− | (COUNT(DISTINCT ?language) AS ?languages)
| |
− | WHERE {
| |
− | ?record prop:P2 entity:Q2 .
| |
− | ?record prop:P6 ?date .
| |
− | ?record prop:P5 ?speaker .
| |
− | ?record prop:P4 ?language .
| |
− | BIND( SUBSTR(str(?date), 0, 8) as ?yearmonth )
| |
− | }
| |
− | GROUP BY ?yearmonth
| |
− | ORDER BY ?yearmonth
| |
− | </query>
| |
− | <translate>
| |
− | == Number of records per languages == <!--T:1-->
| |
− | </translate>
| |
− | | |
− | <query _pagination="10" language="<translate><!--T:37--> Item (Language Qid)</translate>" code="<translate><!--T:38--> ISO 639-3 code</translate>" nb="<translate><!--T:39--> Number of records</translate>">
| |
− | select ?language ?languageLabel ?code (COUNT(DISTINCT ?record) as ?nb)
| |
− | <translate>
| |
− | <!--T:7-->
| |
− | where {
| |
− | ?record prop:P2 entity:Q2 .
| |
− | ?record prop:P4 ?language .
| |
− | OPTIONAL { ?language prop:P13 ?code }
| |
− | OPTIONAL { ?language rdfs:label ?languageLabel . FILTER (lang(?languageLabel) = "en"). }
| |
− | }
| |
− | GROUP BY ?language ?languageLabel ?code
| |
− | ORDER BY DESC(?nb)
| |
− | </query><!-- Just insert corresponding language code instead of "en" --></translate>
| |
− | <translate>
| |
− | | |
− | == The most prolific speakers == <!--T:2-->
| |
− | </translate>
| |
− | | |
− | <query _pagination="10" locutor="<translate><!--T:40--> Item (locutor Qid)</translate>" locutorLabel="<translate><!--T:41--> Speaker</translate>" nb="<translate><!--T:42--> Number of records</translate>">
| |
− | SELECT ?locutor ?locutorLabel ?nb WHERE {
| |
− | {
| |
− | SELECT ?locutor (COUNT(?record) as ?nb)
| |
− | WHERE {
| |
− | ?record prop:P2 entity:Q2 . # Q2: record, P2: instance of.
| |
− | ?record prop:P5 ?locutor . # Property:P5: speaker
| |
− | }
| |
− | GROUP BY ?locutor ?locutorLabel
| |
− | ORDER BY DESC(?nb)
| |
− | LIMIT 50
| |
− | }
| |
− | SERVICE wikibase:label {
| |
− | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
| |
− | ?locutor rdfs:label ?locutorLabel .
| |
− | }
| |
− | }
| |
− | ORDER BY DESC(?nb)
| |
− | </query>
| |
− | | |
− | <translate>
| |
− | == The most prolific speakers for the current month == <!--T:28-->
| |
− | </translate>
| |
− | | |
− | <query _pagination="10" locutor="<translate><!--T:43--> Item (locutor Qid)</translate>" locutorLabel="<translate><!--T:44--> Speaker</translate>" nb="<translate><!--T:45--> Number of records for the current month</translate>">
| |
− | SELECT ?locutor ?locutorLabel ?nb WHERE {
| |
− | {
| |
− | SELECT ?locutor (COUNT(?record) as ?nb)
| |
− | WHERE {
| |
− | ?record prop:P2 entity:Q2 . # Q2: record, P2: instance of.
| |
− | ?record prop:P5 ?locutor . # Property:P5: speaker
| |
− | ?record prop:P6 ?date .
| |
− | FILTER ( YEAR(?date) = YEAR(NOW()) && MONTH(?date) = MONTH(NOW()) )
| |
− | }
| |
− | GROUP BY ?locutor ?locutorLabel
| |
− | ORDER BY DESC(?nb)
| |
− | LIMIT 50
| |
− | }
| |
− | SERVICE wikibase:label {
| |
− | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
| |
− | ?locutor rdfs:label ?locutorLabel .
| |
− | }
| |
− | }
| |
− | ORDER BY DESC(?nb)
| |
− | </query>
| |
| | | |
| __NOTOC__ | | __NOTOC__ |