Template:Wdquery

From Wikibase Personal data
Revision as of 01:32, 10 May 2019 by 192.168.0.1 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

Parameter 1 is the Sparql query, and parameter 2 is the text to display.

  • {{wdquery|query=
    
    SELECT ?property ?alias ?occurences WHERE {
      hint:Query hint:optimizer "None" .
    
      {
        SELECT ?alias (COUNT (?alias) as ?occurences) WHERE {
          ?tmp a wikibase:Property .
          ?tmp skos:altLabel ?alias FILTER (LANG (?alias) = "en")
        } GROUP BY ?alias
      }
    
      ?property a wikibase:Property .
      ?property skos:altLabel ?alias FILTER (?occurences > 1) .
    } ORDER BY ?alias|an example query}}
    

an example query

See also

[1]