query-9e40b260a083d762e17c6fe5a1f81e41

rq turtle/ttl

list of sortable properties?. Now I want to understand what is sortable and what is not. (Q18668171)orderable Wikidata property . I stumbled upon 3 instances of problem with ORDER BY clauses when working with itemsI had some

Use at

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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?property ?propertyLabel ?type ?moddate
WHERE
{
    ?property                a    wikibase:Property  .

#   sortable properties, according to Q18668171
#   ?property            wdt:P31        wd:Q18668171 .

    ?property       wikibase:propertyType ?type      .
    ?property         schema:dateModified ?moddate   .

#   FILTER ( ?type NOT IN (wikibase:WikibaseItem, wikibase:ExternalId,  wikibase:CommonsMedia, wikibase:Math, wikibase:GlobeCoordinate, wikibase:WikibaseProperty) )

    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }   
} ORDER BY DESC(?type) DESC(?property)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?moddate"):::projected v2("?property"):::projected v1("?type"):::projected c6(["bd:serviceParam"]):::iri c2(["wikibase:Property"]):::iri c8(["en"]):::literal v2 --"a"--> c2 v2 --"wikibase:propertyType"--> v1 v2 --"schema:dateModified"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end