Template:Userpage: Difference between revisions
Appearance
fix query |
fix query (optional) + add legend |
||
| Line 16: | Line 16: | ||
BIND (wd:{{{2|Q157}}} as ?student). | BIND (wd:{{{2|Q157}}} as ?student). | ||
?student wdt:P23 ?interest. | OPTIONAL {?student wdt:P23 ?interest.} | ||
?student wdt:P12 ?complete. | OPTIONAL {?student wdt:P12 ?complete.} | ||
BIND ("box" as ?shape). | BIND ("box" as ?shape). | ||
| Line 26: | Line 26: | ||
} |caption=An overview of all linked items for {{{1|Max Mustermann}}} | } |caption=An overview of all linked items for {{{1|Max Mustermann}}} | ||
}} | }} | ||
This query shows: | |||
* The <span style="background-color:#e3ffd9">items</span> that you have [[Property:P12|completed]]. | |||
* The <span style="background-color:#ffeec2">items</span> that you are [[Property:P23|interested in]]. | |||
Revision as of 12:44, 27 November 2024
This is the user page for {{{1}}}.
The user's node (Item) in the graph is [[Item:{{{2}}}]]
{{#widget:SPARQLquery|code=
- defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/> PREFIX wd: <https://graphit.ur.de/entity/>
SELECT DISTINCT ?student ?studentLabel ?shape ?interest ?interestLabel ?rgb1 ?complete ?completeLabel ?rgb2 WHERE {
BIND (wd:Q157 as ?student).
OPTIONAL {?student wdt:P23 ?interest.}
OPTIONAL {?student wdt:P12 ?complete.}
BIND ("box" as ?shape).
BIND ("ffeec2" as ?rgb1).
BIND ("e3ffd9" as ?rgb2).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } |caption=An overview of all linked items for Max Mustermann }} This query shows:
- The items that you have completed.
- The items that you are interested in.
- param 1 == Username
- param 2 == QID