query-6614f0a153a80f3db1d33a5c6b82444a

rq turtle/ttl

Newest lexemes

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX target1: <http://www.wikidata.org/entity/Q9035>
PREFIX target2: <http://www.wikidata.org/entity/Q24905>

# List lexemes wrt. a lexical category and language
SELECT
  (xsd:date(?earliest_publication_datetime) AS ?publication_date)

  ?lexeme ?lexemeLabel
  (CONCAT("#lexeme/", SUBSTR(STR(?lexeme), 32)) AS ?lexemeUrl)

WHERE {
  {
    SELECT 
      (MIN(?publication_datetime) AS ?earliest_publication_datetime)
      ?lexeme
    WHERE {
      ?lexeme wikibase:lexicalCategory target2: ;
              dct:language target1: ;
              (wdt:P5323 / wdt:P577)| (p:P5323 / pq:P577) ?publication_datetime .
    }
    GROUP BY ?lexeme
    ORDER BY DESC(?earliest_publication_datetime)
    LIMIT 100

  }
  ?lexeme wikibase:lemma ?lexemeLabel
}
ORDER BY DESC(?publication_date)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?earliest_publication_datetime"):::projected v3("?lexeme"):::projected v5("?lexemeLabel"):::projected v6("?lexemeUrl") v6("?publication_date") v4("?publication_datetime") a1((" ")) a2((" ")) c4([http://www.wikidata.org/entity/Q9035]):::iri c2([http://www.wikidata.org/entity/Q24905]):::iri v3 --"wikibase:lexicalCategory"--> c2 v3 --"dct:language"--> c4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"p:P5323"--> a2 a2 --"p:qualifier/P577"--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P5323"--> a1 a1 --"p:direct/P577"--> v4 end union0r <== or ==> union0l end bind1[/"min(?publication_datetime)"/] v4 --o bind1 bind1 --as--o v5 v3 --"wikibase:lemma"--> v5 bind2[/"http://www.w3.org/2001/XMLSchema#date(?earliest_publication_datetime)"/] v5 --o bind2 bind2 --as--o v6 bind3[/"concat('#lexeme/',substring(str(?lexeme),'32^^xsd:integer'))"/] v3 --o bind3 bind3 --as--o v6