query-0acb5946dfd352f24b6afdd9c49aee64

rq turtle/ttl

Les cinq cent éléments les plus récents pour les films SELECT ?item ?qid (GROUP_CONCAT( DISTINCT ?sitelink) as ?links) (SAMPLE(?ids) as ?ids) (SAMPLE(?sl) as ?sl) (SAMPLE(?st) as ?st) WITH { SELECT DISTINCT ?item ?qid { { ?item wdt:P31 wd:Q11424 } UNION { ?item wdt:P31 wd:Q24862 } UNION { ?item wdt:P31 wd:Q506240 } UNION { ?item wdt:P31 wd:Q336144 } BIND (xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) FILTER (?qid > 65200900) .
} ORDER BY DESC(?qid) LIMIT 500
} as %films
WHERE { INCLUDE %films OPTIONAL { [] schema:about ?item ; schema:inLanguage ?l ; schema:name ?w2 BIND( CONCAT("[[:",?l,":",str(?w2),"|",?l,"]]") as ?sitelink) }
?item wikibase:statements ?st; wikibase:sitelinks ?sl ; wikibase:identifiers ?ids } GROUP BY ?item ?qid ORDER BY DESC(?qid) LIMIT 500

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
#Les cinq cent éléments les plus récents pour les films
SELECT ?item ?qid (GROUP_CONCAT( DISTINCT ?sitelink) as ?links)
(SAMPLE(?ids) as ?ids) (SAMPLE(?sl) as ?sl) (SAMPLE(?st) as ?st)

WHERE
{ 

{
    SELECT DISTINCT ?item ?qid
    {
        { ?item wdt:P31 wd:Q11424 } 
        UNION
        { ?item wdt:P31 wd:Q24862 } 
        UNION
        { ?item wdt:P31 wd:Q506240 } 
        UNION
        { ?item wdt:P31 wd:Q336144 }
       BIND (xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) 
       FILTER (?qid > 65200900) .       
    }
    ORDER BY DESC(?qid) 
    LIMIT 500  
}  OPTIONAL { [] schema:about ?item ; schema:inLanguage ?l ; schema:name ?w2  BIND( CONCAT("[[:",?l,":",str(?w2),"|",?l,"]]") as ?sitelink) }   
  ?item wikibase:statements ?st; wikibase:sitelinks ?sl ; wikibase:identifiers ?ids 
}
GROUP BY ?item ?qid 
ORDER BY DESC(?qid) 
LIMIT 500

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?ids"):::projected v2("?item"):::projected v3("?l") v9("?links") v3("?qid"):::projected v5("?sitelink"):::projected v10("?sl"):::projected v10("?st"):::projected v4("?w2") a1((" ")) c4(["wd:Q24862"]):::iri c6(["wd:Q336144"]):::iri c3(["wd:Q11424"]):::iri c5(["wd:Q506240"]):::iri f0[["?qid > '65200900^^xsd:integer'"]] f0 --> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c6 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c5 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c3 end union0r <== or ==> union0l end bind1[/"http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item),'Q'))"/] v2 --o bind1 bind1 --as--o v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a1 -."schema:about".-> v2 a1 --"schema:inLanguage"--> v3 a1 --"schema:name"--> v4 bind2[/"concat('#91;#91;:',?l,':',str(?w2),'|',?l,'#93;#93;')"/] v3 --o bind2 v4 --o bind2 bind2 --as--o v5 end v2 --"wikibase:statements"--> v10 v2 --"wikibase:sitelinks"--> v10 v2 --"wikibase:identifiers"--> v10 bind7[/"?sitelink"/] v5 --o bind7 bind7 --as--o v9 bind8[/"sample(?ids)"/] v10 --o bind8 bind8 --as--o v10 bind9[/"sample(?sl)"/] v10 --o bind9 bind9 --as--o v10 bind10[/"sample(?st)"/] v10 --o bind10 bind10 --as--o v10