query-fdeac68b69a841fbb99d9ba964ef713d

rq turtle/ttl

Number of distinct competitions SELECT ?e (COUNT(DISTINCT ?event) as ?events) WHERE { SELECT ?e ?event ?date WHERE { VALUES (?e ?event ?date) { ("James" "Belgium" "70") ("Mary" "worldwide" "71") ("Mary" "worldwide" "72") ("Mary" "worldwide" "73") ("Mary" "France" "76") } } } GROUP BY ?e

Use at

# Number of distinct competitions
  SELECT ?e (COUNT(DISTINCT ?event) as ?events) WHERE
  {
    SELECT ?e ?event ?date WHERE { 
    VALUES (?e ?event ?date) {
    ("James" "Belgium" "70")
    ("Mary" "worldwide" "71")
    ("Mary" "worldwide" "72")
    ("Mary" "worldwide" "73")
    ("Mary" "France" "76")
    }
    }
  }
  GROUP BY ?e

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?date") v1("?e"):::projected v2("?event"):::projected v4("?events") bind0[/VALUES ?date ?e ?event/] bind0-->v1 bind0-->v2 bind0-->v3 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 bind2[/"count(?event)"/] v2 --o bind2 bind2 --as--o v4