query-b04c57a16d889c71e6296b75c9bc4d0a
same: select awards with respect to person SELECT ?e (GROUP_CONCAT(?v; separator=", ") as ?events) { #different: return CONCAT(?event,"'",?date) as ?v SELECT ?e (CONCAT(?event,"'",?date) as ?v) WHERE { VALUES (?e ?event ?date) { ("James" "Belgium" "70") ("Mary" "worldwide" "71") ("Mary" "worldwide" "72") ("Mary" "worldwide" "73") ("Mary" "France" "76") } } ORDER BY ASC(?date) } GROUP BY ?e ORDER BY DESC(?e)
Use at
- https://query.wikidata.org/sparql
#same: select awards with respect to person
SELECT ?e (GROUP_CONCAT(?v; separator=", ") as ?events)
{
#different: return CONCAT(?event,"'",?date) as ?v
SELECT ?e (CONCAT(?event,"'",?date) as ?v) WHERE {
VALUES (?e ?event ?date) {
("James" "Belgium" "70")
("Mary" "worldwide" "71")
("Mary" "worldwide" "72")
("Mary" "worldwide" "73")
("Mary" "France" "76")
}
} ORDER BY ASC(?date)
}
GROUP BY ?e
ORDER BY DESC(?e)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?date")
v3("?e"):::projected
v3("?event")
v5("?events")
v4("?v"):::projected
bind0[/VALUES ?date ?e ?event/]
bind0-->v3
bind0-->v3
bind0-->v4
bind00(["James"])
bind00 --> bind0
bind01(["Belgium"])
bind01 --> bind0
bind02(["70"])
bind02 --> bind0
bind03(["Mary"])
bind03 --> bind0
bind04(["worldwide"])
bind04 --> bind0
bind05(["71"])
bind05 --> bind0
bind06(["Mary"])
bind06 --> bind0
bind07(["worldwide"])
bind07 --> bind0
bind08(["72"])
bind08 --> bind0
bind09(["Mary"])
bind09 --> bind0
bind010(["worldwide"])
bind010 --> bind0
bind011(["73"])
bind011 --> bind0
bind012(["Mary"])
bind012 --> bind0
bind013(["France"])
bind013 --> bind0
bind014(["76"])
bind014 --> bind0
bind1[/"concat(?event,''',?date)"/]
v3 --o bind1
v4 --o bind1
bind1 --as--o v4
bind3[/"?v"/]
v4 --o bind3
bind3 --as--o v5