PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?place ?placeLabel ?instance ?instanceLabel ?partOf ?partOfLabel WHERE {
  ?place wdt:P37 wd:Q9027 .
  OPTIONAL {
    ?place rdfs:label ?placeLabel FILTER ( lang( ?placeLabel ) = "en" )
  }
  OPTIONAL {
    ?place wdt:P31 ?instance .
    OPTIONAL {
      ?instance rdfs:label ?instanceLabel FILTER ( lang( ?instanceLabel ) = "en" )
    }
  }
  OPTIONAL {
    ?place wdt:P361 ?partOf .
    OPTIONAL {
      ?partOf rdfs:label ?partOfLabel FILTER ( lang( ?partOfLabel ) = "en" )
    }
  }
}
ORDER BY ?placeLabel

Got 617 rows and 6 columns, showing the first 5 and last 5 rows below:
| place                                      | placeLabel                       | instance                                          | instanceLabel                          | partOf | partOfLabel |
| ------------------------------------------ | -------------------------------- | ------------------------------------------------- | -------------------------------------- | ------ | ----------- |
| wd:Q18691202                               |                                  | theatre troupe (wd:Q2416217)                      | theatre troupe (en)                    |        |             |
| wd:Q10685149                               |                                  | voluntary association (wd:Q48204)                 | voluntary association (en)             |        |             |
| wd:Q10685044                               |                                  | students' union (wd:Q877998)                      | students' union (en)                   |        |             |
| wd:Q18658806                               |                                  | primary school (wd:Q9842)                         | primary school (en)                    |        |             |
| wd:Q10649804                               |                                  | theatre company (wd:Q11812394)                    | theatre company (en)                   |        |             |
| ...                                        | ...                              | ...                                               | ...                                    | ...    | ...         |
| Vörå Upper Secondary School (wd:Q10718963) | Vörå Upper Secondary School (en) | sportgymnasium (wd:Q1666523)                      | sportgymnasium (en)                    |        |             |
| Vörå Upper Secondary School (wd:Q10718963) | Vörå Upper Secondary School (en) | upper secondary school in Finland (wd:Q101244523) | upper secondary school in Finland (en) |        |             |
| Wasa Theater (wd:Q3431686)                 | Wasa Theater (en)                | traveling theater (wd:Q2446710)                   | traveling theater (en)                 |        |             |
| Wasa Theater (wd:Q3431686)                 | Wasa Theater (en)                | theatre building (wd:Q24354)                      | theatre building (en)                  |        |             |
| Yrkeshögskolan Sydväst (wd:Q11903078)      | Yrkeshögskolan Sydväst (en)      | university of applied sciences (wd:Q19152599)     | university of applied sciences (en)    |        |             |

Here is a SPARQL query that retrieves all distinct places where the official language is Swedish, along with their labels, the unique instances they belong to (if available), and the unique entities they are part of (if available), ordered alphabetically by the place label:

```sparql
SELECT DISTINCT ?place ?placeLabel ?instance ?instanceLabel ?partOf ?partOfLabel WHERE {
  ?place wdt:P37 wd:Q9027.
  OPTIONAL { ?place rdfs:label ?placeLabel FILTER (lang(?placeLabel) = "en") }
  OPTIONAL { ?place wdt:P31 ?instance. OPTIONAL { ?instance rdfs:label ?instanceLabel FILTER (lang(?instanceLabel) = "en") } }
  OPTIONAL { ?place wdt:P361 ?partOf. OPTIONAL { ?partOf rdfs:label ?partOfLabel FILTER (lang(?partOfLabel) = "en") } }
}
ORDER BY ?placeLabel
```

This query will give you:
- The IRI of the place.
- The English label of the place (if available).
- The IRI and English label of the "instance of" (if available).
- The IRI and English label of the "part of" entity (if available).
- Results are ordered alphabetically by the place label.

Let me know if you need the results or further refinements!

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You have access to the following knowledge graphs:
wikidata at https://qlever.cs.uni-freiburg.de/api/wikidata

You can use the following SPARQL prefixes implicitly in all functions:
cc: <http://creativecommons.org/ns#
data: <https://www.wikidata.org/wiki/Special:EntityData/
dct: <http://purl.org/dc/terms/
geo: <http://www.opengis.net/ont/geosparql#
geof: <http://www.opengis.net/def/function/geosparql/
imdb: <https://www.imdb.com/
math: <http://www.w3.org/2005/xpath-functions/math#
ontolex: <http://www.w3.org/ns/lemon/ontolex#
owl: <http://www.w3.org/2002/07/owl#
p: <http://www.wikidata.org/prop/
pq: <http://www.wikidata.org/prop/qualifier/
pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
pqv: <http://www.wikidata.org/prop/qualifier/value/
pr: <http://www.wikidata.org/prop/reference/
prn: <http://www.wikidata.org/prop/reference/value-normalized/
prov: <http://www.w3.org/ns/prov#
prv: <http://www.wikidata.org/prop/reference/value/
ps: <http://www.wikidata.org/prop/statement/
psn: <http://www.wikidata.org/prop/statement/value-normalized/
psv: <http://www.wikidata.org/prop/statement/value/
qfn: <http://qlever.cs.uni-freiburg.de/function#
ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: <http://www.w3.org/2000/01/rdf-schema#
ref: <http://www.wikidata.org/reference/
s: <http://www.wikidata.org/entity/statement/
schema: <http://schema.org/
skos: <http://www.w3.org/2004/02/skos/core#
v: <http://www.wikidata.org/value/
wd: <http://www.wikidata.org/entity/
wdno: <http://www.wikidata.org/prop/novalue/
wdt: <http://www.wikidata.org/prop/direct/
wdtn: <http://www.wikidata.org/prop/direct-normalized/
wikibase: <http://wikiba.se/ontology#
xsd: <http://www.w3.org/2001/XMLSchema#
foaf: <http://xmlns.com/foaf/0.1/
dc: <http://purl.org/dc/elements/1.1/
gn: <http://www.geonames.org/ontology#
bd: <http://www.bigdata.com/rdf#
hint: <http://www.bigdata.com/queryHints#
qb: <http://purl.org/linked-data/cube#
void: <http://rdfs.org/ns/void#

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Use the functions to search for entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Use the execute function to get feedback on intermediate queries. You can go back and forth between knowledge graph searches and SPARQL query executions to refine the query.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Additional rules:
1. Explain your thought process before and after each step and function call.
2. Do not assume or make up any entities or properties without verifying them with the knowledge graphs and functions.
3. The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
4. Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
5. Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
6. For questions with a "True" or "False" answer the SPARQL query should be an ASK query.
7. Do not use 'SERVICE wikibase:label { bd:serviceParam wikibase:language ...' in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.

[User] What are the distinct places where the official language is Swedish, along with their labels, the unique instances they belong to (if available), and the unique entities they are part of (if available)? Order results alphabetically by place label.

[Assistant]
Let's break down the question:

1. We need to find places (distinct entities) where the official language is Swedish.
2. For each place, we want:
   - The place's IRI.
   - The place's label.
   - The unique "instance of" (P31) they belong to (if available).
   - The unique "part of" (P361) entities they are part of (if available).
3. The results should be ordered alphabetically by the place label.

Step 1: Find the entity for the Swedish language.
Step 2: Find the property for "official language".
Step 3: Find places where the official language is Swedish.
Step 4: For each place, get its label, instance of, and part of (if available).
Step 5: Order by label.

Let's start by searching for the entity for "Swedish language".

[Tool]
Top 10 entity alternatives:
1. Swedish, also known as Swedish language, swed1254, swe, Svenska, sv (wd:Q9027): North Germanic language spoken in Sweden and Finland
2. Swedish language (wd:L616488-S1)
3. Swedish (language) (wd:L743847-S1)
4. Swedish (language) (wd:L612724-S1)
5. Swedish Sign Language, also known as swl, SSL, STS (wd:Q36558): sign language
6. Swedish Language Council (wd:Q3500437): Swedish government agency for language policy
7. Thesaurus:penis (Swedish language) (wd:Q101144592)
8. teaching of Swedish, also known as Swedish language teaching, Swedish language instruction (wd:Q10685751)
9. Swedish language family (wd:Q12646226): family of languages closely related to standard Swedish
10. dictionary of the Swedish language, also known as dictionary of Swedish, Swedish language dictionary, Swedish dictionary (wd:Q55623753): language version of dictionary

[Assistant]
The entity for "Swedish language" is wd:Q9027.

Next, let's find the property for "official language".

[Tool]
Top 10 property alternatives:
1. official language, also known as language spoken, spoken in, speaking, language official (wd:P37 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language designated as official by this item, language used
2. native label, also known as official title, original label, original language label, original language name, original language title (wd:P1705 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): label for the items in their official language  or their original language, name
3. Ethnologue language status, also known as EGIDS, language status (wd:P3823 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language status identifier by Ethnologue.com using EGIDS scale
4. language regulatory body, also known as language authority, regulatory body (wd:P1018 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): regulatory body of a language
5. languages spoken, written or signed, also known as language of expression, language, wrote language, writes language, uses language (wd:P1412 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language(s) that a person or a people speaks, writes or signs, including the native language(s)
6. native language, also known as first language, L1 speaker of, language native, mother tongue (wd:P103 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language or languages a person has learned from early childhood, languages spoken, written or signed
7. language used, also known as languages used, medium of instruction, used language, uses language, working language (wd:P2936 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language widely used (spoken or written) in this place or at this event or organisation
8. language of work or name, also known as language of the reference, language of URL, language of website, language of work, named in language (wd:P407 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language associated with this creative work (such as books, show...guage" (P103) and "languages spoken, written or signed" (P1412))
9. programmed in, also known as language, programming language, written in (wd:P277 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): the programming language(s) in which the software is developed
10. writing language, also known as languages of writings, languages written, language written, writing languages, language of works (wd:P6886 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): language in which the writer has written their work, languages spoken, written or signed

[Assistant]
The property for "official language" is wdt:P37.

Now, let's find places (entities) where the official language (wdt:P37) is Swedish (wd:Q9027). We also want for each such place:
- Its label.
- Its "instance of" (P31) (if available).
- Its "part of" (P361) (if available).

Let's also confirm the properties for "instance of" and "part of" to be sure.

[Tool]
Top 10 property alternatives:
1. instance of, also known as unitary element of class, has type, unique individual of, type, item of type (wd:P31 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): that class of which this subject is a particular example and mem...is a subclass of mountain (and an instance of volcanic landform)
2. Wikidata property example, also known as e.g., Wikidata property sample, property sample, property example, for example (wd:P1855 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): example where this Wikidata property is used; target item is one...ualifier the property being described given the associated value
3. quantity, also known as amount, total number, total, qty, occurrences (wd:P1114 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): number of instances of this subject in the universe of the subje...e actual number of instances in Wikidata may be lower or higher)
4. subproperty of, also known as subclass of property, superproperty, subPropertyOf, rdfs:subPropertyOf, parent property (wd:P1647 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): all resources related by this property are also related by that property, related property
5. partially coincident with, also known as intersecting with, has overlap with, has common parts with, has common members with, has common instances with (wd:P1382 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): object that partially overlaps with the subject in its instances, parts, or members, different from
6. model item, also known as specimen, sample, featured item, example item, best example (wd:P5869 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): defines which item is a best practice example of modelling a sub...lue of this property, usage instructions at Wikidata:Model items
7. permanent duplicated item, also known as same concept as, same as, duplicate of, permanently duplicated item, duplicate of item (wd:P2959 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): this item duplicates another item and the two can't be merged, a... cdowiki, gomwiki, nanwiki).  Use P31=Q17362920 for other wikis.
8. exemplar of, also known as contains work, includes work, contents (wd:P1574 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): Links an individual copy of a work to the item for that work or edition, instance of
9. usage example, also known as sentence, use in a sentence, example sentence (wd:P5831 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): example of how a lexeme (sense) might be used
10. fictional or mythical analog of, also known as fictionalisation of, mythical analog of, fictional version of, fictionalization of, fictional analog of (wd:P1074 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): used to link an entity or class of entities appearing in a creat...with the analogous entity or class of entities in the real world, inspired by

[Tool]
Top 10 property alternatives:
1. part of, also known as of, within, system of, subsystem of, subgroup of (wd:P361 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): object of which the subject is a part (if this subject is alread... of "has part" (P527, see also "has parts of the class" (P2670))
2. parent organization, also known as parent company, parent institution, parent organisation, parent unit, part of (wd:P749 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): parent organization of an organization, opposite of subsidiaries (P355), owned by, part of
3. applies to part, also known as when viewed as, valid for part, section, region, per (wd:P518 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): part, aspect, or form of the item to which the claim applies
4. partially coincident with, also known as intersecting with, has overlap with, has common parts with, has common members with, has common instances with (wd:P1382 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): object that partially overlaps with the subject in its instances, parts, or members, different from
5. proportion, also known as %, share, ratio, part, percent (wd:P1107 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): to be used as a qualifier, value must be between 0 and 1
6. has part(s), also known as has component, incorporates, has ingredient, has ingredients, has member (wd:P527 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): part of this subject; inverse property of "part of" (P361). See also "has parts of the class" (P2670).
7. located in the present-day administrative territorial entity, also known as present-day administrative territorial entity, located in the current administrative territorial entity, located in the modern-day administrative territorial entity, located in the present-day administrative territorial entity, would today be located in administrative territorial entity (wd:P3842 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): the item was located in the territory of this present-day administrative unit; however the two did not at any point coexist in time, location, part of
8. depicted part, also known as part depicted, part shown, shown part (wd:P5961 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): use as qualifier for "depicts" (P180)
9. based on, also known as modelled after, inspired by, iteration of, modeled after, fork of (wd:P144 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): the work(s) or inputs used as the basis for subject item; for fictional analog use P1074, references work, tradition or theory, inspired by
10. territory overlaps, also known as partially overlaps, partially coincident with, partly coincident with, partly located in territorial entity, partly overlaps (wd:P3179 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): part or all of the area associated with (this) entity overlaps part or all of the area associated with that entity, partially coincident with

[Assistant]
The property for "instance of" is wdt:P31, and for "part of" is wdt:P361.

Now, let's construct a SPARQL query to:
- Select all distinct places (?place) where ?place wdt:P37 wd:Q9027.
- Optionally get their labels (?placeLabel).
- Optionally get their "instance of" (?instance) and "part of" (?partOf).
- Optionally get the labels for "instance of" and "part of".
- Order by ?placeLabel.

Let's write and execute this query.

[Tool]
Got 617 rows and 6 columns, showing the first 5 and last 5 rows below:
| place                                      | placeLabel                       | instance                                          | instanceLabel                          | partOf | partOfLabel |
| ------------------------------------------ | -------------------------------- | ------------------------------------------------- | -------------------------------------- | ------ | ----------- |
| wd:Q18691202                               |                                  | theatre troupe (wd:Q2416217)                      | theatre troupe (en)                    |        |             |
| wd:Q10685149                               |                                  | voluntary association (wd:Q48204)                 | voluntary association (en)             |        |             |
| wd:Q10685044                               |                                  | students' union (wd:Q877998)                      | students' union (en)                   |        |             |
| wd:Q18658806                               |                                  | primary school (wd:Q9842)                         | primary school (en)                    |        |             |
| wd:Q10649804                               |                                  | theatre company (wd:Q11812394)                    | theatre company (en)                   |        |             |
| ...                                        | ...                              | ...                                               | ...                                    | ...    | ...         |
| Vörå Upper Secondary School (wd:Q10718963) | Vörå Upper Secondary School (en) | sportgymnasium (wd:Q1666523)                      | sportgymnasium (en)                    |        |             |
| Vörå Upper Secondary School (wd:Q10718963) | Vörå Upper Secondary School (en) | upper secondary school in Finland (wd:Q101244523) | upper secondary school in Finland (en) |        |             |
| Wasa Theater (wd:Q3431686)                 | Wasa Theater (en)                | traveling theater (wd:Q2446710)                   | traveling theater (en)                 |        |             |
| Wasa Theater (wd:Q3431686)                 | Wasa Theater (en)                | theatre building (wd:Q24354)                      | theatre building (en)                  |        |             |
| Yrkeshögskolan Sydväst (wd:Q11903078)      | Yrkeshögskolan Sydväst (en)      | university of applied sciences (wd:Q19152599)     | university of applied sciences (en)    |        |             |

[Assistant]
Here is a SPARQL query that retrieves all distinct places where the official language is Swedish, along with their labels, the unique instances they belong to (if available), and the unique entities they are part of (if available), ordered alphabetically by the place label:

```sparql
SELECT DISTINCT ?place ?placeLabel ?instance ?instanceLabel ?partOf ?partOfLabel WHERE {
  ?place wdt:P37 wd:Q9027.
  OPTIONAL { ?place rdfs:label ?placeLabel FILTER (lang(?placeLabel) = "en") }
  OPTIONAL { ?place wdt:P31 ?instance. OPTIONAL { ?instance rdfs:label ?instanceLabel FILTER (lang(?instanceLabel) = "en") } }
  OPTIONAL { ?place wdt:P361 ?partOf. OPTIONAL { ?partOf rdfs:label ?partOfLabel FILTER (lang(?partOfLabel) = "en") } }
}
ORDER BY ?placeLabel
```

This query will give you:
- The IRI of the place.
- The English label of the place (if available).
- The IRI and English label of the "instance of" (if available).
- The IRI and English label of the "part of" entity (if available).
- Results are ordered alphabetically by the place label.

Let me know if you need the results or further refinements!


PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?property ( COUNT( * ) AS ?count ) WHERE {
  ?item wdt:P31 wd:Q40231 .
  ?item ?property ?value .
  FILTER ( STRSTARTS( STR( ?property ) , "http://www.wikidata.org/prop/direct/" ) )
}
GROUP BY ?property
ORDER BY DESC ( ?count )

Got 159 rows and 2 columns, showing the first 5 and last 5 rows below:
| property                                           | count           |
| -------------------------------------------------- | --------------- |
| instance of (wdt:P31)                              | 24894 (xsd:int) |
| wdt:P31279                                         | 24412 (xsd:int) |
| country (wdt:P17)                                  | 20034 (xsd:int) |
| point in time (wdt:P585)                           | 13237 (xsd:int) |
| candidate (wdt:P726)                               | 10863 (xsd:int) |
| ...                                                | ...             |
| age of candidacy (wdt:P2998)                       | 1 (xsd:int)     |
| National Library of Wales Authority ID (wdt:P2966) | 1 (xsd:int)     |
| day of week (wdt:P2894)                            | 1 (xsd:int)     |
| country of citizenship (wdt:P27)                   | 1 (xsd:int)     |
| IdRef ID (wdt:P269)                                | 1 (xsd:int)     |

The properties most commonly used in claims related to items that are public elections (wd:Q40231) include 'instance of' (wdt:P31), wdt:P31279, 'country' (wdt:P17), 'point in time' (wdt:P585), and 'candidate' (wdt:P726), among others. The query returns all properties used, along with a count of how many times each property was used.

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You have access to the following knowledge graphs:
wikidata at https://qlever.cs.uni-freiburg.de/api/wikidata

You can use the following SPARQL prefixes implicitly in all functions:
cc: <http://creativecommons.org/ns#
data: <https://www.wikidata.org/wiki/Special:EntityData/
dct: <http://purl.org/dc/terms/
geo: <http://www.opengis.net/ont/geosparql#
geof: <http://www.opengis.net/def/function/geosparql/
imdb: <https://www.imdb.com/
math: <http://www.w3.org/2005/xpath-functions/math#
ontolex: <http://www.w3.org/ns/lemon/ontolex#
owl: <http://www.w3.org/2002/07/owl#
p: <http://www.wikidata.org/prop/
pq: <http://www.wikidata.org/prop/qualifier/
pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
pqv: <http://www.wikidata.org/prop/qualifier/value/
pr: <http://www.wikidata.org/prop/reference/
prn: <http://www.wikidata.org/prop/reference/value-normalized/
prov: <http://www.w3.org/ns/prov#
prv: <http://www.wikidata.org/prop/reference/value/
ps: <http://www.wikidata.org/prop/statement/
psn: <http://www.wikidata.org/prop/statement/value-normalized/
psv: <http://www.wikidata.org/prop/statement/value/
qfn: <http://qlever.cs.uni-freiburg.de/function#
ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: <http://www.w3.org/2000/01/rdf-schema#
ref: <http://www.wikidata.org/reference/
s: <http://www.wikidata.org/entity/statement/
schema: <http://schema.org/
skos: <http://www.w3.org/2004/02/skos/core#
v: <http://www.wikidata.org/value/
wd: <http://www.wikidata.org/entity/
wdno: <http://www.wikidata.org/prop/novalue/
wdt: <http://www.wikidata.org/prop/direct/
wdtn: <http://www.wikidata.org/prop/direct-normalized/
wikibase: <http://wikiba.se/ontology#
xsd: <http://www.w3.org/2001/XMLSchema#
foaf: <http://xmlns.com/foaf/0.1/
dc: <http://purl.org/dc/elements/1.1/
gn: <http://www.geonames.org/ontology#
bd: <http://www.bigdata.com/rdf#
hint: <http://www.bigdata.com/queryHints#
qb: <http://purl.org/linked-data/cube#
void: <http://rdfs.org/ns/void#

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Use the functions to search for entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Use the execute function to get feedback on intermediate queries. You can go back and forth between knowledge graph searches and SPARQL query executions to refine the query.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Additional rules:
1. Explain your thought process before and after each step and function call.
2. Do not assume or make up any entities or properties without verifying them with the knowledge graphs and functions.
3. The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
4. Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
5. Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
6. For questions with a "True" or "False" answer the SPARQL query should be an ASK query.
7. Do not use 'SERVICE wikibase:label { bd:serviceParam wikibase:language ...' in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.

[User] Which properties are used in claims related to items that are public elections? Include a count of the number of times it was used.

[Assistant]
Let's break down the question:

1. We need to identify items that are "public elections".
2. For claims (statements) related to these items, we want to find which properties are used.
3. For each property, we want to count how many times it was used in claims about public elections.

Step 1: Find the entity for "public election" in Wikidata.
Step 2: Find items that are instances of "public election".
Step 3: For these items, find all claims (statements) and the properties used.
Step 4: Count the usage of each property.

Let's start by searching for the entity "public election".

[Tool]
Top 10 entity alternatives:
1. public election, also known as elections, election (wd:Q40231): process by which a population chooses the holder of a public office
2. Public election committee (wd:Q127273596)
3. Public Offices Election Act (wd:Q11392186)
4. Public Official Election Act (wd:Q12592014): South Korean law
5. Election publication praised (wd:Q95492900)
6. 2009 New York City Public Advocate election, also known as 2009 NYC Public Advocate election, New York City Public Advocate election, 2009 (wd:Q7013284)
7. 2017 New York City Public Advocate election, also known as 2017 NYC Public Advocate election, New York City Public Advocate election, 2017 (wd:Q43078961)
8. 2021 New York City Public Advocate election, also known as 2021 NYC Public Advocate election (wd:Q106651975)
9. 2013 New York City Public Advocate election, also known as New York City Public Advocate election, 2013, 2013 NYC Public Advocate election (wd:Q17091644)
10. 2019 New York City Public Advocate election, also known as 2019 NYC Public Advocate election (wd:Q85732015)

[Assistant]
The most relevant entity for "public election" is wd:Q40231, which represents the process by which a population chooses the holder of a public office.

Next, we need to find items that are instances of (P31) "public election" (wd:Q40231), then for those items, find all claims and the properties used, and count the number of times each property appears.

Let's check which properties are used in claims about items that are instances of "public election".

[Tool]
Top 10 property alternatives:
1. instance of, also known as unitary element of class, has type, unique individual of, type, item of type (wd:P31 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): that class of which this subject is a particular example and mem...is a subclass of mountain (and an instance of volcanic landform)
2. Wikidata property example, also known as e.g., Wikidata property sample, property sample, property example, for example (wd:P1855 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): example where this Wikidata property is used; target item is one...ualifier the property being described given the associated value
3. quantity, also known as amount, total number, total, qty, occurrences (wd:P1114 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): number of instances of this subject in the universe of the subje...e actual number of instances in Wikidata may be lower or higher)
4. subproperty of, also known as subclass of property, superproperty, subPropertyOf, rdfs:subPropertyOf, parent property (wd:P1647 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): all resources related by this property are also related by that property, related property
5. partially coincident with, also known as intersecting with, has overlap with, has common parts with, has common members with, has common instances with (wd:P1382 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): object that partially overlaps with the subject in its instances, parts, or members, different from
6. model item, also known as specimen, sample, featured item, example item, best example (wd:P5869 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): defines which item is a best practice example of modelling a sub...lue of this property, usage instructions at Wikidata:Model items
7. permanent duplicated item, also known as same concept as, same as, duplicate of, permanently duplicated item, duplicate of item (wd:P2959 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): this item duplicates another item and the two can't be merged, a... cdowiki, gomwiki, nanwiki).  Use P31=Q17362920 for other wikis.
8. exemplar of, also known as contains work, includes work, contents (wd:P1574 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): Links an individual copy of a work to the item for that work or edition, instance of
9. usage example, also known as sentence, use in a sentence, example sentence (wd:P5831 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): example of how a lexeme (sense) might be used
10. fictional or mythical analog of, also known as fictionalisation of, mythical analog of, fictional version of, fictionalization of, fictional analog of (wd:P1074 as wdt/psv/psn/prn/pqv/ps/p/prv/pr/wdtn/pq/pqn): used to link an entity or class of entities appearing in a creat...with the analogous entity or class of entities in the real world, inspired by

[Assistant]
The property "instance of" is wd:P31. So, to find all items that are instances of "public election" (wd:Q40231), we look for items where wdt:P31 = wd:Q40231.

Next, for these items, we want to find all claims (statements) and the properties used in those claims, and count how many times each property is used.

This requires:
- Selecting all items where wdt:P31 = wd:Q40231.
- For each such item, finding all triples where the item is the subject and the property is a Wikidata property (i.e., has the wdt: namespace).
- Grouping by property and counting the number of times each property is used.

Let's try to write a SPARQL query that does this.

[Tool]
Got 159 rows and 2 columns, showing the first 5 and last 5 rows below:
| property                                           | count           |
| -------------------------------------------------- | --------------- |
| instance of (wdt:P31)                              | 24894 (xsd:int) |
| wdt:P31279                                         | 24412 (xsd:int) |
| country (wdt:P17)                                  | 20034 (xsd:int) |
| point in time (wdt:P585)                           | 13237 (xsd:int) |
| candidate (wdt:P726)                               | 10863 (xsd:int) |
| ...                                                | ...             |
| age of candidacy (wdt:P2998)                       | 1 (xsd:int)     |
| National Library of Wales Authority ID (wdt:P2966) | 1 (xsd:int)     |
| day of week (wdt:P2894)                            | 1 (xsd:int)     |
| country of citizenship (wdt:P27)                   | 1 (xsd:int)     |
| IdRef ID (wdt:P269)                                | 1 (xsd:int)     |

[Tool] Stopped generation process


PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?year ?count WHERE {
  wd:Q317032 p:P2196 ?statement .
  ?statement ps:P2196 ?count .
  ?statement pq:P585 ?date .
  BIND( YEAR( ?date ) AS ?year )
}
ORDER BY ?year

The University of Düsseldorf (ROR ID 024z2rq82) had the following student counts by year (where available):

1998: 23,997
1999: 24,789
2000: 24,868
2001: 25,537
2002: 25,220
...
2018: 36,571
2019: 37,540 and 37,473 (two values)
2020: 36,070
2021: 33,942

The full SPARQL query returns all available years and counts, ordered by year.

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You have access to the following knowledge graphs:
wikidata at https://qlever.cs.uni-freiburg.de/api/wikidata-sebastian

You can use the following SPARQL prefixes implicitly in all functions:
cc: <http://creativecommons.org/ns#
data: <https://www.wikidata.org/wiki/Special:EntityData/
dct: <http://purl.org/dc/terms/
geo: <http://www.opengis.net/ont/geosparql#
geof: <http://www.opengis.net/def/function/geosparql/
imdb: <https://www.imdb.com/
math: <http://www.w3.org/2005/xpath-functions/math#
ontolex: <http://www.w3.org/ns/lemon/ontolex#
owl: <http://www.w3.org/2002/07/owl#
p: <http://www.wikidata.org/prop/
pq: <http://www.wikidata.org/prop/qualifier/
pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
pqv: <http://www.wikidata.org/prop/qualifier/value/
pr: <http://www.wikidata.org/prop/reference/
prn: <http://www.wikidata.org/prop/reference/value-normalized/
prov: <http://www.w3.org/ns/prov#
prv: <http://www.wikidata.org/prop/reference/value/
ps: <http://www.wikidata.org/prop/statement/
psn: <http://www.wikidata.org/prop/statement/value-normalized/
psv: <http://www.wikidata.org/prop/statement/value/
qfn: <http://qlever.cs.uni-freiburg.de/function#
ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: <http://www.w3.org/2000/01/rdf-schema#
ref: <http://www.wikidata.org/reference/
s: <http://www.wikidata.org/entity/statement/
schema: <http://schema.org/
skos: <http://www.w3.org/2004/02/skos/core#
v: <http://www.wikidata.org/value/
wd: <http://www.wikidata.org/entity/
wdno: <http://www.wikidata.org/prop/novalue/
wdt: <http://www.wikidata.org/prop/direct/
wdtn: <http://www.wikidata.org/prop/direct-normalized/
wikibase: <http://wikiba.se/ontology#
xsd: <http://www.w3.org/2001/XMLSchema#
foaf: <http://xmlns.com/foaf/0.1/
dc: <http://purl.org/dc/elements/1.1/
gn: <http://www.geonames.org/ontology#
bd: <http://www.bigdata.com/rdf#
hint: <http://www.bigdata.com/queryHints#
qb: <http://purl.org/linked-data/cube#
void: <http://rdfs.org/ns/void#

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Use the functions to search for entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Use the execute function to get feedback on intermediate queries. You can go back and forth between knowledge graph searches and SPARQL query executions to refine the query.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Additional rules:
1. Explain your thought process before and after each step and function call.
2. Do not assume or make up any entities or properties without verifying them with the knowledge graphs and functions.
3. The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
4. Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
5. Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
6. For questions with a "True" or "False" answer the SPARQL query should be an ASK query.
7. Do not use 'SERVICE wikibase:label { bd:serviceParam wikibase:language ...' in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.

[User] How many students did the educational organization with the Research Organization Registry (ROR) ID "024z2rq82" have each year? Please include a count for each year (if available), and order results by year.

[Assistant]
Let's break down the question:

1. We need to identify the educational organization with the ROR ID "024z2rq82" in Wikidata.
2. We need to find the property in Wikidata that links an organization to its ROR ID.
3. We need to find the property that gives the number of students for an educational organization, ideally with qualifiers for the year.
4. We need to construct a query that retrieves the number of students for the organization, grouped by year, and ordered by year.

First, let's search for the property in Wikidata that links an organization to its ROR ID.

[Tool]
Top 10 property alternatives:
1. ROR ID, also known as Research Organization Registry ID, ror.org ID (wd:P6782 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier for the Research Organization Registry
2. Relations Ontology ID, also known as RO ID, Relation Ontology ID (wd:P3590 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): ID in the Relations Ontology
3. Rijksmuseum Research Library authority ID, also known as RRL ID (wd:P7444 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): authority control identifier for the Rijksmuseum Research Library
4. RBU person ID, also known as RBU ID (wd:P6387 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier for a person at the Russian Biathlon Union site
5. Online Coins of the Roman Empire ID, also known as OCRE ID, Roman Imperial Coinage ID, RIC ID, RIC coin ID, OCRE coin ID (wd:P9645 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier of a coin in the Online Coins of the Roman Empire pla...the Roman Imperial Coinage (RIC) series published by Spink & Son
6. Research Resource Identifier, also known as RRID, SciCrunch identifier (wd:P9712 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier in the SciCrunch database of research resources
7. Australian Women's Register ID, also known as AWR ID, womenaustralia.info (wd:P4186 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier for a person or organisation in the Australian Women's Register
8. Channel One Russia show ID, also known as 1tv.ru ID, Channel One Russia ID, COR ID (wd:P10170 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier of TV program for Channel One Russia
9. French national research structure ID, also known as French national research structure identifier, RNSR ID, national research structure identifier (France) (wd:P3016 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier in the French national research structure repertory
10. Russian Academy of Sciences person ID, also known as RAS ID, Russian Academy of Sciences ID (wd:P10133 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier for a member of the Russian Academy of Sciences

[Assistant]
The property for ROR ID in Wikidata is wd:P6782.

Next, let's find the educational organization in Wikidata that has the ROR ID "024z2rq82".

[Tool]
Got 1 row and 3 columns:
| subject                               | property           | object    |
| ------------------------------------- | ------------------ | --------- |
| University of Düsseldorf (wd:Q317032) | ROR ID (wdt:P6782) | 024z2rq82 |

[Assistant]
The educational organization with ROR ID "024z2rq82" is the University of Düsseldorf (wd:Q317032).

Now, let's find the property in Wikidata that represents the number of students at an educational organization. I'll search for relevant properties using the query "number of students".

[Tool]
Top 10 property alternatives:
1. count of students, also known as count of pupils, count of students, enrollment, number of pupils, number of pupils or students (wd:P2196 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of pupils or students of any type in an educational organ...evious years normal rank (not deprecated rank). Don't overwrite.
2. student, also known as teacher to, teacher of, had student, students, pupils (wd:P802 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): notable student(s) of the subject individual, significant person
3. number of out-of-school children (wd:P2573 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of out-of-school children reported for a place
4. number of teachers, also known as faculty count (wd:P10610 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of teachers at an educational facility
5. school class, also known as class, cohort, grade, school cohort, stage (wd:P7174 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): (qualifier) class of a given year/time period to which the person belonged in an educational institution
6. number of children, also known as children, children (number), how many children, issue, kids (wd:P1971 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of children of the person, animal, or character
7. educated at, also known as graduated from, graduate of, place of education, school attended, schooled at (wd:P69 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): educational institution attended by subject, affiliation
8. student retention rate (wd:P11698 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): proportion of first-year students at the educational institution who return for their second year
9. number of participants, also known as number of competitors, number of teams, participant count, participants, qty participants (wd:P1132 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of participants of an event, e.g. people or groups of people that take part in the event (NO units), quantity
10. educational stage, also known as student classification (wd:P7374 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): educational stage of a specific school; qualifier of "educated at" (P69): the education stage of someone's attendance of school

[Assistant]
The property for "number of students" is wd:P2196 ("count of students").

Now, we need to check if this property is used with a qualifier for the year, so we can get the number of students per year. I'll list some triples for University of Düsseldorf (wd:Q317032) with the property "count of students" (wd:P2196) to see how the data is structured.

[Tool]
Got 30 rows and 3 columns, showing the first 10 rows below:
| subject                               | property                    | object                                         |
| ------------------------------------- | --------------------------- | ---------------------------------------------- |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-163fa73b-4434-7be5-fd07-d50d325069a4 |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-178bcf5a-4613-c47d-9ca9-4d44eb7f3a62 |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-19fa6afc-4f49-945b-bbd8-6ec23baf9838 |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-23682D64-639B-43C4-9A39-FA0CAE327A5B |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-2A2CA78D-75A5-46E8-A6B5-56E6F32987AD |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-369DD2C9-277C-41D0-BD3D-3FE647655516 |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-396896d1-4700-d830-4836-737cf0085eae |
| University of Düsseldorf (wd:Q317032) | count of students (p:P2196) | s:Q317032-3A56BFEC-87C8-4613-9D2E-7F1BE6C1FD1F |
| ...                                   | ...                         | ...                                            |

[Tool]
Got 7 rows and 3 columns:
| subject                                        | property                      | object                                       |
| ---------------------------------------------- | ----------------------------- | -------------------------------------------- |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | point in time (pq:P585)       | 2020-01-01T00:00:00Z (xsd:dateTime)          |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | count of students (ps:P2196)  | 36070 (xsd:decimal)                          |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | wikibase:rank                 | wikibase:NormalRank                          |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | rdf:type                      | wikibase:Statement                           |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | prov:wasDerivedFrom           | ref:8afda77d9a1661ce34e62e49884068a391063cba |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | point in time (pqv:P585)      | v:018d3e563d283a80cd8422d6196984eb           |
| s:Q317032-0446592E-2A87-4DAF-8D19-ECB5092AF812 | count of students (psv:P2196) | v:854103e64b3e4ecab4f6681b5f9642fb           |

[Tool]
Got 8 rows and 3 columns:
| subject                                        | property                      | object                                       |
| ---------------------------------------------- | ----------------------------- | -------------------------------------------- |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | point in time (pq:P585)       | 2012-01-01T00:00:00Z (xsd:dateTime)          |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | count of students (ps:P2196)  | 23511 (xsd:decimal)                          |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | wikibase:rank                 | wikibase:NormalRank                          |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | rdf:type                      | wikibase:Statement                           |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | prov:wasDerivedFrom           | ref:6b2df734fea1be368e6504d9cc48bc1fa492d205 |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | point in time (pqv:P585)      | v:a4cd9904a78844d854ea927fbdded8f2           |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | count of students (psv:P2196) | v:9658596f5150b7a9c351ce3a979f592a           |
| s:Q317032-0e325fec-46eb-432a-00b1-1ff3d1afe700 | prov:wasDerivedFrom           | ref:8afda77d9a1661ce34e62e49884068a391063cba |

[Assistant]
The "count of students" (wd:P2196) is qualified by "point in time" (wd:P585), which gives the year.

Now, I will construct a SPARQL query to retrieve, for the University of Düsseldorf (wd:Q317032), the number of students (wd:P2196) and the corresponding year (wd:P585), ordered by year.

[Tool]
Got 31 rows and 2 columns, showing the first 5 and last 5 rows below:
| year           | count               |
| -------------- | ------------------- |
| 1998 (xsd:int) | 23997 (xsd:decimal) |
| 1999 (xsd:int) | 24789 (xsd:decimal) |
| 2000 (xsd:int) | 24868 (xsd:decimal) |
| 2001 (xsd:int) | 25537 (xsd:decimal) |
| 2002 (xsd:int) | 25220 (xsd:decimal) |
| ...            | ...                 |
| 2018 (xsd:int) | 36571 (xsd:decimal) |
| 2019 (xsd:int) | 37540 (xsd:decimal) |
| 2019 (xsd:int) | 37473 (xsd:decimal) |
| 2020 (xsd:int) | 36070 (xsd:decimal) |
| 2021 (xsd:int) | 33942 (xsd:decimal) |

[Tool] Stopped generation process


PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?highway ?label ?number WHERE {
  ?highway wdt:P16 wd:Q1967342 .
  ?highway rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" ) BIND( STRAFTER( ?label , "National Highway " ) AS ?numstr ) FILTER ( REGEX( ?numstr , "^[0-9]+$" ) ) BIND( xsd:integer ( ?numstr ) AS ?number ) FILTER ( ?number < 100 )
}
ORDER BY ?number

Got 80 rows and 3 columns, showing the first 5 and last 5 rows below:
| highway                            | label                    | number       |
| ---------------------------------- | ------------------------ | ------------ |
| National Highway 1 (wd:Q642922)    | National Highway 1 (en)  | 1 (xsd:int)  |
| National Highway 2 (wd:Q25203036)  | National Highway 2 (en)  | 2 (xsd:int)  |
| National Highway 3 (wd:Q25203039)  | National Highway 3 (en)  | 3 (xsd:int)  |
| National Highway 4 (wd:Q6973185)   | National Highway 4 (en)  | 4 (xsd:int)  |
| National Highway 5 (wd:Q25203045)  | National Highway 5 (en)  | 5 (xsd:int)  |
| ...                                | ...                      | ...          |
| National Highway 79 (wd:Q25203074) | National Highway 79 (en) | 79 (xsd:int) |
| National Highway 81 (wd:Q25352382) | National Highway 81 (en) | 81 (xsd:int) |
| National Highway 83 (wd:Q25212186) | National Highway 83 (en) | 83 (xsd:int) |
| National Highway 85 (wd:Q25207402) | National Highway 85 (en) | 85 (xsd:int) |
| National Highway 87 (wd:Q24238723) | National Highway 87 (en) | 87 (xsd:int) |

This query returns all Indian National Highways that are part of the national highways of India transport network, with their English labels and highway numbers (extracted from the label), only including highways with numbers less than 100, ordered by highway number.

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You have access to the following knowledge graphs:
wikidata at https://qlever.cs.uni-freiburg.de/api/wikidata-sebastian

You can use the following SPARQL prefixes implicitly in all functions:
cc: <http://creativecommons.org/ns#
data: <https://www.wikidata.org/wiki/Special:EntityData/
dct: <http://purl.org/dc/terms/
geo: <http://www.opengis.net/ont/geosparql#
geof: <http://www.opengis.net/def/function/geosparql/
imdb: <https://www.imdb.com/
math: <http://www.w3.org/2005/xpath-functions/math#
ontolex: <http://www.w3.org/ns/lemon/ontolex#
owl: <http://www.w3.org/2002/07/owl#
p: <http://www.wikidata.org/prop/
pq: <http://www.wikidata.org/prop/qualifier/
pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
pqv: <http://www.wikidata.org/prop/qualifier/value/
pr: <http://www.wikidata.org/prop/reference/
prn: <http://www.wikidata.org/prop/reference/value-normalized/
prov: <http://www.w3.org/ns/prov#
prv: <http://www.wikidata.org/prop/reference/value/
ps: <http://www.wikidata.org/prop/statement/
psn: <http://www.wikidata.org/prop/statement/value-normalized/
psv: <http://www.wikidata.org/prop/statement/value/
qfn: <http://qlever.cs.uni-freiburg.de/function#
ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: <http://www.w3.org/2000/01/rdf-schema#
ref: <http://www.wikidata.org/reference/
s: <http://www.wikidata.org/entity/statement/
schema: <http://schema.org/
skos: <http://www.w3.org/2004/02/skos/core#
v: <http://www.wikidata.org/value/
wd: <http://www.wikidata.org/entity/
wdno: <http://www.wikidata.org/prop/novalue/
wdt: <http://www.wikidata.org/prop/direct/
wdtn: <http://www.wikidata.org/prop/direct-normalized/
wikibase: <http://wikiba.se/ontology#
xsd: <http://www.w3.org/2001/XMLSchema#
foaf: <http://xmlns.com/foaf/0.1/
dc: <http://purl.org/dc/elements/1.1/
gn: <http://www.geonames.org/ontology#
bd: <http://www.bigdata.com/rdf#
hint: <http://www.bigdata.com/queryHints#
qb: <http://purl.org/linked-data/cube#
void: <http://rdfs.org/ns/void#

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Use the functions to search for entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Use the execute function to get feedback on intermediate queries. You can go back and forth between knowledge graph searches and SPARQL query executions to refine the query.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Additional rules:
1. Explain your thought process before and after each step and function call.
2. Do not assume or make up any entities or properties without verifying them with the knowledge graphs and functions.
3. The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
4. Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
5. Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
6. For questions with a "True" or "False" answer the SPARQL query should be an ASK query.
7. Do not use 'SERVICE wikibase:label { bd:serviceParam wikibase:language ...' in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.

[User] What are the Indian National Highways that are part of the national highways of India transport network? Return also their English labels and highway numbers (extracted from the labels), only include highways with numbers less than 100, and order by highway number.

[Assistant]
Let's break down the question:

1. We are looking for Indian National Highways that are part of the national highways of India transport network.
2. We need their English labels and highway numbers (extracted from the labels).
3. Only include highways with numbers less than 100.
4. Order the results by highway number.

Step 1: Identify the entity for "Indian National Highway" and "national highways of India transport network".
Step 2: Find the property that links highways to the transport network.
Step 3: Extract the highway number from the label.
Step 4: Filter for highways with numbers less than 100 and order accordingly.

First, let's search for the entity "Indian National Highway".

[Tool]
Top 10 entity alternatives:
1. Indian Oil Fuel Filling Station ...ay (Jay Jalaram Krupa Petroleum), also known as Indian Oil Petrol Pump Old National Highway (wd:Q131950634): fuel station of IndianOil in Ankleshwar District, Gujarat, India
2. Indian Oil Fuel Filling Station ...al Highway (Rameshwar Petroleum), also known as Indian Oil Petrol Pump Old National Highway (wd:Q131950636): fuel station of IndianOil in Ankleshwar District, Gujarat, India
3. Indian Oil Fuel Filling Station ...onal Highway (Dwrakesh Agencies), also known as Indian Oil Petrol Pump Labbaikudikadu National Highway (wd:Q131964834): fuel station of IndianOil in Perambalur District, Tamil Nadu, India
4. Indian Oil Fuel Filling Station ...way 128B (Janta Service Station), also known as Indian Oil Petrol Pump National Highway 128B (wd:Q131945545): fuel station of IndianOil in Azamgarh District, Uttar Pradesh, India
5. Indian Oil Fuel Filling Station ...y 130 (Pitambar Filling Station), also known as Indian Oil Petrol Pump National Highway 130 (wd:Q131957322): fuel station of IndianOil in Ambikapur District, Chhattisgarh, India
6. Indian Oil Fuel Filling Station ... Highway 130CD (Srinivasa Fuels), also known as Indian Oil Petrol Pump National Highway 130CD (wd:Q131971088): fuel station of IndianOil in Nabarangapur District, Odisha, India
7. Indian Oil Fuel Filling Station ...y 129A (Jalukie Filling Station), also known as Indian Oil Petrol Pump National Highway 129A (wd:Q131972847): fuel station of IndianOil in Peren District, Nagaland, India
8. Indian Oil Fuel Filling Station ...al Highway 128B (Usha Petroleum), also known as Indian Oil Petrol Pump National Highway 128B (wd:Q131945575): fuel station of IndianOil in Ballia District, Uttar Pradesh, India
9. Indian Oil Fuel Filling Station ...hway 128B (Shiv Filling Station), also known as Indian Oil Petrol Pump National Highway 128B (wd:Q131945465): fuel station of IndianOil in Azamgarh District, Uttar Pradesh, India
10. Indian Oil Fuel Filling Station ...8B (Saubhagya Sumitra Petroleum), also known as Indian Oil Petrol Pump National Highway 128B (wd:Q131945546): fuel station of IndianOil in Azamgarh District, Uttar Pradesh, India

[Tool]
Top 10 entity alternatives:
1. National Highway 544, also known as National Highway 47 (India)(old numbering), Salem - Kochi Highway, NH 544 (India), NH544, National Highway 544 (India) (wd:Q765630): national highway in South India connecting Salem and Kochi
2. National Highway 47, also known as Bamanbore - Nagpur Highway, National Highway 47 (India), NH 47 (wd:Q25203064): national highway in India running through Gujarat and Madhya Pradesh
3. National Highway 32 (India) (wd:Q12450079)
4. National Highway 505, also known as National Highway 505 (India) (wd:Q50409103): National Highway in Himachal Pradesh, India
5. National Highway 8C (India) (wd:Q12450142)
6. National Highway 179A, also known as National Highway 179A (India) (wd:Q39573809): national highway in India
7. National Highway 161E, also known as National Highway 161E (India) (wd:Q56289412): national highway in India
8. National Highway 251 (India) (wd:Q55473647): national highway in India
9. National Highway 352A (India) (wd:Q55876664): National Highway in India
10. National Highway 148A (India) (wd:Q111337703): National Highway of India

[Tool]
Top 10 entity alternatives:
1. national highways of India, also known as India's National Highways, National Highway, National Highways of India (wd:Q1967342): network of highways owned by the Government of India
2. National Highways Authority of India, also known as NHAI (wd:Q282114): Agency responsible for Road Construction and It's Management in India
3. National Highways Authority of India Act, 1988 (wd:Q95338787): Act of the Parliament of India
4. Ministry of Road Transport and Highways, also known as Ministry of Road Transport and Highways, Government of India, MoRTH (wd:Q167156): government ministry in India
5. National Highways Authority of India (Amendment) Act, 2013 (wd:Q79471774): Act of the Parliament of India
6. Roadkill animals on national highways of Karnataka, India (wd:Q125952091): scientific article published in 2012
7. transport in India, also known as transport of India, transport (India), transportation of India, transportation (India), India transport (wd:Q2065643): methods of transportation in India
8. National Library of India (wd:Q619913): national library located in Kolkata
9. national park of India, also known as Indian National Parks and Wildlife Sanctuaries (wd:Q1125269): IUCN (International union of conservation of Nature)
10. National Museum, also known as National Museum, New Delhi, National Museum of India (wd:Q1356138): National and art museum in New Delhi, India

[Tool]
Top 10 property alternatives:
1. transport network, also known as transport network, transit network, tram network, trail system, system of routes (wd:P16 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): network the infrastructure is a part of, part of
2. in operation on service, also known as transport route of vehicle, transport route operated, transport route served, transport route serviced, used on route (wd:P10788 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): service that a vehicle is operating on
3. place served by transport hub, also known as serves city, train station serves, served by transport hub, city served, area served by transport hub (wd:P931 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): territorial entity or entities served by this transport hub (airport, train station, etc.), significant place
4. facilitates flow of, also known as carries, channel for, controls flux of, enables flow of, regulates flow of (wd:P10228 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): the cargo/substrate actively transported or passively channeled by a protein
5. public transport stop, also known as transport stop nearby, transport station nearby, subway station, stop nearby, station nearby (wd:P8453 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): general (e.g. nearest) public transport stop (bus, tram, train, subway)
6. means of locomotion, also known as locomotion, means of transport, locomotion method (wd:P3512 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): method that the subject uses to move from one place to another
7. connecting line, also known as is on, railway line, rail line connected to, line connected to (wd:P81 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): railway line(s) subject is directly connected to, part of
8. railway traffic side, also known as handedness of railway traffic (wd:P5658 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): indicates for a country or a railway line whether rail traffic usually runs on the left or right hand side
9. interchange station, also known as OSI, out of station interchange (wd:P833 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): station to which passengers can transfer from this station, normally without extra expense, significant place
10. route number, also known as line number, public transport line number (wd:P1671 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of a rail or other public transport line, location code

[Tool]
Got 652 rows and 3 columns, showing the first 10 rows below:
| subject                            | property                    | object                                   |
| ---------------------------------- | --------------------------- | ---------------------------------------- |
| National Highway 66 (wd:Q3520609)  | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 11 (wd:Q765649)   | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 2 (wd:Q25203036)  | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 19 (wd:Q25209307) | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 16 (wd:Q643140)   | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 44 (wd:Q643144)   | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 5 (wd:Q25203045)  | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 48 (wd:Q28178832) | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 1 (wd:Q642922)    | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| National Highway 51 (wd:Q1757346)  | transport network (wdt:P16) | national highways of India (wd:Q1967342) |
| ...                                | ...                         | ...                                      |

[Tool]
Got 20 rows and 1 column, showing the first 5 and last 5 rows below:
| highway                                         |
| ----------------------------------------------- |
| Raipur–Visakhapatnam Expressway (wd:Q104848629) |
| National Highway 109K (wd:Q105759673)           |
| National Highway 148A (wd:Q106647823)           |
| National Highway 229 (wd:Q106652354)            |
| National Highway 753AB (wd:Q106668254)          |
| ...                                             |
| National Highway 516C (wd:Q106674019)           |
| National Highway 731B (wd:Q106674652)           |
| National Highway 911A (wd:Q106674726)           |
| National Highway 148C (wd:Q106675858)           |
| National Highway 148NA (wd:Q106678177)          |

[Tool]
Top 10 property alternatives:
1. language style, also known as manner, term register, obsolete, register, sense register (wd:P6191 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): to denote of the way a sense of a word is used, e.g., slang, vulgarism, babytalk, colloquialism, etc.
2. name, also known as also known as, referred to as, label, known as, be known as (wd:P2561 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): name the subject is known by; preferably use a more specific subproperty if available
3. record label, also known as label, labels (wd:P264 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): brand and trademark associated with the marketing of subject music recordings and music videos
4. name (image), also known as name as image, label image, label as image, image of name, image as label (wd:P7407 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): name of something, when it's not fully supported by Unicode or contains characters that are not widely supported, icon
5. native label, also known as official title, original label, original language label, original language name, original language title (wd:P1705 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): label for the items in their official language  or their original language, name
6. Labelcode (wd:P7320 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): record label identifier code issued by Gesellschaft zur Verwertung von Leistungsschutzrechten (GVL)
7. male form of label, also known as male form of label (string), male gender sense, masculine form of label (wd:P3321 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): male form of name or title (for female use P2521)
8. MusicBrainz label ID, also known as label ID, Label MBID, MBID label, MBL, MB label (wd:P966 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier for a label in the MusicBrainz open music encyclopedia
9. female form of label, also known as female form of label (string), female gender sense, feminine form of label (wd:P2521 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): female form of name or title (for male use P3321)
10. Wikidata language code, also known as Wikidata language identifier, Wikidata language ID, Wikidata language codes, term language code, termbox language code (wd:P9753 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): identifier for a language or variant at Wikidata (use P424 (Wikimedia language code) to identify the language of a Wikimedia wiki), Wikimedia language code

[Tool]
Got 100 rows and 2 columns, showing the first 5 and last 5 rows below:
| highway                                         | label                                |
| ----------------------------------------------- | ------------------------------------ |
| Raipur–Visakhapatnam Expressway (wd:Q104848629) | Raipur–Visakhapatnam Expressway (en) |
| National Highway 109K (wd:Q105759673)           | National Highway 109K (en)           |
| National Highway 148A (wd:Q106647823)           | National Highway 148A (en)           |
| National Highway 229 (wd:Q106652354)            | National Highway 229 (en)            |
| National Highway 753AB (wd:Q106668254)          | National Highway 753AB (en)          |
| ...                                             | ...                                  |
| National Highway 302 (wd:Q18619662)             | National Highway 302 (en)            |
| National Highway 306 (wd:Q18619663)             | National Highway 306 (en)            |
| National Highway 307 (wd:Q18619664)             | National Highway 307 (en)            |
| National Highway 325 (wd:Q18619665)             | National Highway 325 (en)            |
| National Highway 502 (wd:Q18619667)             | National Highway 502 (en)            |

[Tool]
Top 10 property alternatives:
1. road number, also known as shield number, route number, highway number (wd:P1824 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number assigned to a stretch of public roadway; omit any prefix or suffix indicated by a road number formatter (P8498), location code
2. road number formatter, also known as highway abbreviation formatter, highway number formatter, road abbreviation formatter, route abbreviation formatter, route number formatter (wd:P8498 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): template from which “$1” can be automatically replaced by a bare...umber to obtain the alphanumeric abbreviation of a numbered road
3. route map, also known as schema, street map, railway map, subway map, transit map (wd:P15 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): image of route map at Wikimedia Commons, locator map image
4. route number, also known as line number, public transport line number (wd:P1671 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number of a rail or other public transport line, location code
5. traffic sign, also known as road sign, trail blazer, shield, route shield, route marker (wd:P14 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): graphic symbol describing the item, used at the side of or above roads to give instructions or provide information to road users, logo image
6. transport network, also known as transport network, transit network, tram network, trail system, system of routes (wd:P16 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): network the infrastructure is a part of, part of
7. house number, also known as housenumber, street number, house number, address number (wd:P670 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): number in the street address. To be used as a qualifier of Property:P669 "located on street", series ordinal
8. place name sign, also known as roadside sign, toponym sign, running in board, signage image, street sign (wd:P1766 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): image of (road) sign with place name on it, image
9. located on street, also known as on street, street address, street, square, road (wd:P669 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): street, road, or square, where the item is located. To add the n...perty P6375 "street address", if there is no item for the street, location, part of
10. in operation on service, also known as transport route of vehicle, transport route operated, transport route served, transport route serviced, used on route (wd:P10788 as psv/psn/ps/pq/p/pqv/pqn/prn/pr/prv/wdtn/wdt): service that a vehicle is operating on

[Tool] Got no rows and 3 columns

[Tool]
Got 57,461 rows and 3 columns, showing the first 10 rows below:
| subject                                     | property                | object |
| ------------------------------------------- | ----------------------- | ------ |
| U.S. Route 66 (wd:Q79934)                   | road number (wdt:P1824) | US 66  |
| Karakoram Highway (wd:Q217099)              | road number (wdt:P1824) | N-35   |
| Hong Kong–Zhuhai–Macau Bridge (wd:Q1191515) | road number (wdt:P1824) | G94    |
| Mont Blanc Tunnel (wd:Q323310)              | road number (wdt:P1824) | T1     |
| European route E6 (wd:Q921422)              | road number (wdt:P1824) | E6     |
| European route E8 (wd:Q1129207)             | road number (wdt:P1824) | E8     |
| European route E75 (wd:Q638912)             | road number (wdt:P1824) | E75    |
| European route E80 (wd:Q877647)             | road number (wdt:P1824) | E80    |
| European route E40 (wd:Q327162)             | road number (wdt:P1824) | E40    |
| European route E5 (wd:Q693493)              | road number (wdt:P1824) | E5     |
| ...                                         | ...                     | ...    |

[Tool] Got no rows and 3 columns

[Tool] Got no rows and 3 columns

[Tool] Got no rows and 3 columns

[Assistant]
It appears that the property "road number" (wdt:P1824) for Indian National Highways is not consistently a pure number (e.g., "11"), but may include prefixes like "NH 11" or "National Highway 11", or may not be present at all. This makes it unreliable for direct numeric filtering.

Given this, the best approach is to:
- Select all highways that are part of the national highways of India transport network (wd:Q1967342).
- Get their English labels.
- Extract the highway number from the label using a regex in SPARQL, filtering for numbers less than 100.
- Order by the extracted highway number.

I will now write a SPARQL query that:
- Selects highways with wdt:P16 wd:Q1967342.
- Gets their English rdfs:label.
- Uses a regex to extract the number from labels like "National Highway 11".
- Filters for numbers < 100.
- Orders by the extracted number.

Here is the query.

[Tool] Stopped generation process