query-119c00cb78a867ccd4518adae84a964f

rq turtle/ttl

Films only on Armenian Wikipedia SELECT (SAMPLE(?year) AS ?year) ?statements (GROUP_CONCAT(DISTINCT ?origlang) as ?origlangs) ?item ?locallabel ?itemLabel ?itemDescription (SAMPLE(?originaltitle) AS ?originaltitle) (xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) { ?item wdt:P31/wdt:P279* wd:Q11424 . ?item wikibase:sitelinks 1 . [] schema:about ?item; schema:isPartOf https://hy.wikipedia.org/; schema:inLanguage ?lll . ?item rdfs:label ?locallabel . FILTER(lang(?locallabel) = ?lll ) . ?item wikibase:statements ?statements . OPTIONAL { ?item wdt:P364/wdt:P424 ?origlang } OPTIONAL { ?item wdt:P1476 ?originaltitle } OPTIONAL { ?item wdt:P577 ?date . BIND(YEAR(?date) as ?year) } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } GROUP BY ?item ?statements ?locallabel ?itemLabel ?itemDescription ORDER BY DESC(?year) LIMIT 1000

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/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Films only on Armenian Wikipedia
SELECT  (SAMPLE(?year) AS ?year) 
        ?statements 
        (GROUP_CONCAT(DISTINCT ?origlang) as ?origlangs) 
        ?item ?locallabel ?itemLabel ?itemDescription 
        (SAMPLE(?originaltitle) AS ?originaltitle) 
        (xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid)
{
    ?item wdt:P31/wdt:P279* wd:Q11424 . 
    ?item wikibase:sitelinks 1 . 
    [] schema:about ?item; schema:isPartOf <https://hy.wikipedia.org/>; schema:inLanguage ?lll .
    ?item rdfs:label ?locallabel . FILTER(lang(?locallabel) = ?lll ) .
    ?item wikibase:statements ?statements . 
    OPTIONAL { ?item wdt:P364/wdt:P424 ?origlang } 
    OPTIONAL { ?item wdt:P1476 ?originaltitle }
    OPTIONAL { ?item wdt:P577 ?date . BIND(YEAR(?date) as ?year) } 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
GROUP BY ?item ?statements ?locallabel ?itemLabel ?itemDescription
ORDER BY DESC(?year)    LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?date") v4("?item"):::projected v3("?lll") v2("?locallabel"):::projected v10("?originaltitle"):::projected v6("?origlang"):::projected v9("?origlangs") v10("?qid") v5("?statements"):::projected v9("?year"):::projected a2((" ")) a1((" ")) a3((" ")) c19(["en"]):::literal c5(["1^^xsd:integer"]):::literal c17(["bd:serviceParam"]):::iri c3(["wd:Q11424"]):::iri c8([https://hy.wikipedia.org/]):::iri f0[["?locallabel = ?lll"]] f0 --> v2 f0 --> v3 v4 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v4 --"wikibase:sitelinks"--> c5 a2 --"schema:about"--> v4 a2 --"schema:isPartOf"--> c8 a2 --"schema:inLanguage"--> v3 v4 --"rdfs:label"--> v2 v4 --"wikibase:statements"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P364".-> a3 a3 --"wdt:P424"--> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P1476".-> v10 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P577".-> v8 bind1[/"year-from-dateTime(?date)"/] v8 --o bind1 bind1 --as--o v9 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c17 --"wikibase:language"--> c19 end bind5[/"sample(?year)"/] v9 --o bind5 bind5 --as--o v9 bind6[/"?origlang"/] v6 --o bind6 bind6 --as--o v9 bind7[/"sample(?originaltitle)"/] v10 --o bind7 bind7 --as--o v10 bind8[/"http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item),'Q'))"/] v4 --o bind8 bind8 --as--o v10