query-4939e13cbcc4763d3de2567895fad0c0

rq turtle/ttl

table of world Go competitions and champions (also viewable as map and image grid)

1). variables after SELECT DISTINCT can be replaced with "x y", in which

x can be ?countryLabel or ?start_yearLabel or ?end_yearLabel or ?seriesLabel and

y can be "(COUNT(DISTINCT ?competition) AS ?champion)" or "(AVG(?win_age) AS ?AVG_win_age)" or "(AVG(?pro_age) AS ?AVG_pro_age)", and

the query can be viewed as table, bar chart, line chart, area chart, and bubble chart;

2). variables after SELECT DISTINCT can be replaced with

"?seriesLabel (YEAR(MAX(?end))-YEAR(MIN(?start))+1 AS ?series_years) (MIN(?start) AS ?MIN_start) (MAX(?end) AS ?MAX_end)"

Note: Using YEAR("MAX|MIN"()), not "MAX|MIN"(YEAR()), to avoid null value and reduce calculation amount.

to query ?series's life years (minimum value 1) and start/end time, and

the query can be viewed as table, bar chart, line chart, area chart, bubble chart, and timeline;

3). variables after SELECT DISTINCT can be replaced with "?endLabel ?series ?series_string ?countryLabel",

viewed as scatter chart (also viewable as table);

4). variables after SELECT DISTINCT can be replaced with

"?winnerLabel (COUNT(DISTINCT ?competition) AS ?champion) (YEAR(MAX(?end))-YEAR(MIN(?end))+1 AS ?win_years) (AVG(?win_age) AS ?AVG_win_age)

(MIN(?end) AS ?1st_win) (MAX(?end) AS ?last_win)"

Note: The 2nd variable (Y-axis in bar/line/area chart; size in bubble chart) can be replaced with

(YEAR(MAX(?end))-YEAR(MIN(?end))+1 AS ?win_years) or (AVG(?win_age) AS ?AVG_win_age).

to query ?winner's champion number, win years (minimum value 1), average win age, and first/last win time, and

the query can be viewed as table, bar chart, line chart, area chart, bubble chart, and timeline

SELECT DISTINCT ?competition ?competitionLabel ?seriesLabel ?edition ?start ?end ?participants ?winner ?winnerLabel ?image ?surnameLabel ?win_age ?pro_age ?birth_placeLabel ?coord ?countryLabel WHERE { # ?competition is instance of (P31) ?series {?competition wdt:P31 ?series. # ?series is instance of (P31) "subclass of (P279)" [ZeroOrMorePath ()] recurring sporting event (Q18608583) ?series wdt:P31/wdt:P279 wd:Q18608583} # OR ?competition's sports season of league or competition (P3450) is ?series UNION {?competition wdt:P3450 ?series} # ?series's "instance of" (P31) statement is ?x_worldGo {?series p:P31 ?x_worldGo. # ?x_worldGo's value is ?worldGo ?x_worldGo ps:P31 ?worldGo} # OR ?series's "subclass of" (P279) statement is ?x_worldGo UNION {?series p:P279 ?x_worldGo. # ?x_worldGo's value is ?worldGo ?x_worldGo ps:P279 ?worldGo} # ?worldGo is subclass of (P279) [ZeroOrMorePath ()] world Go competition (Q10869075) ?worldGo wdt:P279 wd:Q10869075 # ?competition should not have competition class (P2094) that is subclass of (P279) [ZeroOrMorePath ()] ?not ### Note: Ideally, wdt:P2094/wdt:P279 should be wdt:P2094/(wdt:P2094|wdt:P279) to cover more possible paths, ### but wdt:P2094/(wdt:P2094|wdt:P279) causes server error and has to be replaced with a less ideal one. FILTER NOT EXISTS {?competition wdt:P2094/wdt:P279 ?not # define ?not as women's sports (Q920057) or team sport (Q216048) # or amateur sports (Q15991269) or youth sports (Q599867) or senior sport (Q1395783) ### Note: VALUES has to be inside, not outside, of FILTER. VALUES ?not {wd:Q920057 wd:Q216048 wd:Q15991269 wd:Q599867 wd:Q1395783} } # ?competition should not have number of participants (P1132) that (?a) is less than 9 # so that ?competition either has number of participants (P1132) more than 8 # or does not have number of participants (P1132) FILTER NOT EXISTS {?competition wdt:P1132 ?a FILTER(?a<9)} # ?competition's start time should be the same as or later than ?series's start time to be world Go competition # (so that the first 2 editions of Tongyang Cup (Q1049397) can be excluded), i.e., # NOT EXISTS: 1. ?x_worldGo has qualifier "start time" (P580), ?start1, and FILTER NOT EXISTS {?x_worldGo pq:P580 ?start1. # 2. ?competition has start time (P580), ?start2, and ### Note: If this line is removed, and ?start2 is replaced with ?start in the next line, ### then ?competition without start time (P580) will also be excluded. ?competition wdt:P580 ?start2 # 3. ?start2 is earlier than ?start1 FILTER (?start2 < ?start1)} # optional: show ?competition's edition number (P393) as ?edition OPTIONAL {?competition wdt:P393 ?edition} # optional: show ?competition's start time (P580) as ?start OPTIONAL {?competition wdt:P580 ?start # bind ?start's year as ?start_year BIND(YEAR(?start) AS ?start_year) } # optional: show ?competition's end time (P582) as ?end OPTIONAL {?competition wdt:P582 ?end # bind ?end's year as ?end_year BIND(YEAR(?end) AS ?end_year) } # optional: show ?competition's number of participants (P1132) as ?participants OPTIONAL {?competition wdt:P1132 ?participants} # optional: ?competition's "winner" (P1346) statement is ?x_winner OPTIONAL {?competition p:P1346 ?x_winner. # ?x_winner's value is ?winner ?x_winner ps:P1346 ?winner # optional: show ?winner's image (P18) as ?image OPTIONAL {?winner wdt:P18 ?image} # optional: show ?winner's family name (P734) as ?surname OPTIONAL {?winner wdt:P734 ?surname} # optional: show ?x_winner's s qualifier "age at event" (P3629) as ?win_age OPTIONAL {?x_winner pq:P3629 ?win_age} # optional: ?winner's "occupation" (P106) statement is ?x_pro OPTIONAL {?winner p:P106 ?x_pro. # ?x_pro's value is subclass of (P279) [ZeroOrMorePath ()] Go professional (Q3186699) ?x_pro ps:P106/wdt:P279 wd:Q3186699 # optional: ?x_pro's qualifier "start time" (P580) is ?pro_start OPTIONAL {?x_pro pq:P580 ?pro_start} } # optional: ?winner's birth date (P569) is ?birth_date OPTIONAL {?winner wdt:P569 ?birth_date} # use IF to calculate the age when ?winner turned pro, and bind the age as ?pro_age BIND(IF(MONTH(?pro_start)>MONTH(?birth_date) || (MONTH(?pro_start)=MONTH(?birth_date) && DAY(?pro_start)>=DAY(?birth_date)), YEAR(?pro_start)-YEAR(?birth_date), YEAR(?pro_start)-YEAR(?birth_date)-1) AS ?pro_age) # optional: show ?winner's birth place (P19) as ?birth_place OPTIONAL {?winner wdt:P19 ?birth_place # optional: show birth_place's coordinate location (P625) as ?coord OPTIONAL {?birth_place wdt:P625 ?coord} } # optional: ?x_winner's qualifier "country for sport" (P1532) is ?country1 OPTIONAL {?x_winner pq:P1532 ?country1} # optional: ?winner's country for sport (P1532) is ?country2 OPTIONAL {?winner wdt:P1532 ?country2} # use IF and Exists to bind ?country1 or ?country2 as ?country: # if ?x_winner's qualifier "country for sport" (P1532), ?country1, exists, bind ?country1 as ?country # otherwise (?country1 doesn't exist), bind ?country2 as ?country BIND(IF(Exists{?x_winner pq:P1532 ?country1}, ?country1, ?country2) AS ?country) } # optional: ?x_worldGo's qualifier "start time" (P580) is ?inception1 ### Note: Removing this line causes server error. OPTIONAL {?x_worldGo pq:P580 ?inception1} # optional: ?series's inception (P571) is ?inception2 OPTIONAL {?series wdt:P571 ?inception2} # use IF and EXISTS to bind ?inception1 or ?inception2 as ?inception: # if ?x_worldGo's qualifier "start time" (P580), ?inception1, exists, bind ?inception1 as ?inception # otherwise (?inception1 doesn't exist), bind ?inception2 as ?inception BIND(IF(EXISTS{?x_worldGo pq:P580 ?inception1}, ?inception1, ?inception2) AS ?inception) # optional: ?inception_date's point in time (P585) is ?inception OPTIONAL {?inception_date wdt:P585 ?inception # ?inception_date is instance of (P31) "subclass of (P279)" [ZeroOrMorePath ()] calendar day of a given year (Q47150325) ### Note: Removing FILTER(EXISTS{}) and directly using "?inception_date wdt:P31/wdt:P279 wd:Q47150325", ### although legitimate, causes server error, for unknown reason. FILTER(EXISTS{?inception_date wdt:P31/wdt:P279 wd:Q47150325}) # optional: ?inception_date's "short name" (P1813) statement is ?x_inception_shortname OPTIONAL {?inception_date p:P1813 ?x_inception_shortname. # ?x_inception_shortname's value is ?inception_shortname ?x_inception_shortname ps:P1813 ?inception_shortname; # x_inception_shortname's qualifier "determination method" (P459) is ISO 8601 basic format (Q97462483) pq:P459 wd:Q97462483} } # optional: ?series's "short name" (P1813) statement is ?x_series_shortname OPTIONAL {?series p:P1813 ?x_series_shortname. # ?x_series_shortname's value is ?series_shortname ?x_series_shortname ps:P1813 ?series_shortname; # ?x_series_shortname's qualifier "language of work or name" (P407) is English (Q1860) pq:P407 wd:Q1860} # concatenate ?inception_shortname, a space, and ?series_shortname as ?series_string BIND(CONCAT(?inception_shortname, " ", ?series_shortname) as ?series_string) # show label in auto language as default, and English when no default label exists SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

1). when using "x y" after SELECT DISTINCT, add "GROUP BY x" below;

2). when using "?seriesLabel..." after SELECT DISTINCT, add "GROUP BY ?seriesLabel" below;

4). when using "?winnerLabel..." after SELECT DISTINCT, add "GROUP BY ?winnerLabel" below

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# table of world Go competitions and champions (also viewable as map and image grid)
## 1). variables after SELECT DISTINCT can be replaced with "x y", in which
## x can be ?countryLabel or ?start_yearLabel or ?end_yearLabel or ?seriesLabel and
## y can be "(COUNT(DISTINCT ?competition) AS ?champion)" or "(AVG(?win_age) AS ?AVG_win_age)" or "(AVG(?pro_age) AS ?AVG_pro_age)", and
## the query can be viewed as table, bar chart, line chart, area chart, and bubble chart;
## 2). variables after SELECT DISTINCT can be replaced with
## "?seriesLabel (YEAR(MAX(?end))-YEAR(MIN(?start))+1 AS ?series_years) (MIN(?start) AS ?MIN_start) (MAX(?end) AS ?MAX_end)"
### Note: Using YEAR("MAX|MIN"()), not "MAX|MIN"(YEAR()), to avoid null value and reduce calculation amount.
## to query ?series's life years (minimum value 1) and start/end time, and
## the query can be viewed as table, bar chart, line chart, area chart, bubble chart, and timeline;
## 3). variables after SELECT DISTINCT can be replaced with "?endLabel ?series ?series_string ?countryLabel",
## viewed as scatter chart (also viewable as table);
## 4). variables after SELECT DISTINCT can be replaced with
## "?winnerLabel (COUNT(DISTINCT ?competition) AS ?champion) (YEAR(MAX(?end))-YEAR(MIN(?end))+1 AS ?win_years) (AVG(?win_age) AS ?AVG_win_age)
## (MIN(?end) AS ?1st_win) (MAX(?end) AS ?last_win)"
### Note: The 2nd variable (Y-axis in bar/line/area chart; size in bubble chart) can be replaced with
### (YEAR(MAX(?end))-YEAR(MIN(?end))+1 AS ?win_years) or (AVG(?win_age) AS ?AVG_win_age).
## to query ?winner's champion number, win years (minimum value 1), average win age, and first/last win time, and
## the query can be viewed as table, bar chart, line chart, area chart, bubble chart, and timeline
SELECT DISTINCT ?competition ?competitionLabel ?seriesLabel ?edition ?start ?end ?participants ?winner ?winnerLabel ?image ?surnameLabel
                ?win_age ?pro_age ?birth_placeLabel ?coord ?countryLabel
WHERE {
  # ?competition is instance of (P31) ?series
  {?competition wdt:P31 ?series.
   # ?series is instance of (P31) "subclass of (P279)" [ZeroOrMorePath (*)] recurring sporting event (Q18608583)
   ?series wdt:P31/wdt:P279* wd:Q18608583}
  # OR ?competition's sports season of league or competition (P3450) is ?series
  UNION {?competition wdt:P3450 ?series}
  # ?series's "instance of" (P31) statement is ?x_worldGo
  {?series p:P31 ?x_worldGo.
   # ?x_worldGo's value is ?worldGo
   ?x_worldGo ps:P31 ?worldGo}
  # OR ?series's "subclass of" (P279) statement is ?x_worldGo
  UNION {?series p:P279 ?x_worldGo.
         # ?x_worldGo's value is ?worldGo
         ?x_worldGo ps:P279 ?worldGo}
  # ?worldGo is subclass of (P279) [ZeroOrMorePath (*)] world Go competition (Q10869075)
  ?worldGo wdt:P279* wd:Q10869075
  # ?competition should not have competition class (P2094) that is subclass of (P279) [ZeroOrMorePath (*)] ?not
  ### Note: Ideally, wdt:P2094/wdt:P279* should be wdt:P2094/(wdt:P2094|wdt:P279)* to cover more possible paths,
  ### but wdt:P2094/(wdt:P2094|wdt:P279)* causes server error and has to be replaced with a less ideal one.
  FILTER NOT EXISTS {?competition wdt:P2094/wdt:P279* ?not
                     # define ?not as women's sports (Q920057) or team sport (Q216048)
                     # or amateur sports (Q15991269) or youth sports (Q599867) or senior sport (Q1395783)
                     ### Note: VALUES has to be inside, not outside, of FILTER.
                     VALUES ?not {wd:Q920057 wd:Q216048 wd:Q15991269 wd:Q599867 wd:Q1395783} }
  # ?competition should not have number of participants (P1132) that (?a) is less than 9
  # so that ?competition either has number of participants (P1132) more than 8
  # or does not have number of participants (P1132)
  FILTER NOT EXISTS {?competition wdt:P1132 ?a FILTER(?a<9)}
  # ?competition's start time should be the same as or later than ?series's start time to be world Go competition
  # (so that the first 2 editions of Tongyang Cup (Q1049397) can be excluded), i.e.,
  # NOT EXISTS: 1. ?x_worldGo has qualifier "start time" (P580), ?start1, and
  FILTER NOT EXISTS {?x_worldGo pq:P580 ?start1.
                     # 2. ?competition has start time (P580), ?start2, and
                     ### Note: If this line is removed, and ?start2 is replaced with ?start in the next line,
                     ### then ?competition without start time (P580) will also be excluded.
                     ?competition wdt:P580 ?start2
                     # 3. ?start2 is earlier than ?start1
                     FILTER (?start2 < ?start1)}
  # optional: show ?competition's edition number (P393) as ?edition
  OPTIONAL {?competition wdt:P393 ?edition}
  # optional: show ?competition's start time (P580) as ?start
  OPTIONAL {?competition wdt:P580 ?start
            # bind ?start's year as ?start_year
            BIND(YEAR(?start) AS ?start_year) }
  # optional: show ?competition's end time (P582) as ?end
  OPTIONAL {?competition wdt:P582 ?end
            # bind ?end's year as ?end_year
            BIND(YEAR(?end) AS ?end_year) }
  # optional: show ?competition's number of participants (P1132) as ?participants
  OPTIONAL {?competition wdt:P1132 ?participants}
  # optional: ?competition's "winner" (P1346) statement is ?x_winner
  OPTIONAL {?competition p:P1346 ?x_winner.
            # ?x_winner's value is ?winner
            ?x_winner ps:P1346 ?winner
            # optional: show ?winner's image (P18) as ?image
            OPTIONAL {?winner wdt:P18 ?image}
            # optional: show ?winner's family name (P734) as ?surname
            OPTIONAL {?winner wdt:P734 ?surname}
            # optional: show ?x_winner's s qualifier "age at event" (P3629) as ?win_age
            OPTIONAL {?x_winner pq:P3629 ?win_age}
            # optional: ?winner's "occupation" (P106) statement is ?x_pro
            OPTIONAL {?winner p:P106 ?x_pro.
                      # ?x_pro's value is subclass of (P279) [ZeroOrMorePath (*)] Go professional (Q3186699)
                      ?x_pro ps:P106/wdt:P279* wd:Q3186699
                      # optional: ?x_pro's qualifier "start time" (P580) is ?pro_start
                      OPTIONAL {?x_pro pq:P580 ?pro_start} }
            # optional: ?winner's birth date (P569) is ?birth_date
            OPTIONAL {?winner wdt:P569 ?birth_date}
            # use IF to calculate the age when ?winner turned pro, and bind the age as ?pro_age
            BIND(IF(MONTH(?pro_start)>MONTH(?birth_date) || (MONTH(?pro_start)=MONTH(?birth_date) && DAY(?pro_start)>=DAY(?birth_date)),
                    YEAR(?pro_start)-YEAR(?birth_date), YEAR(?pro_start)-YEAR(?birth_date)-1) AS ?pro_age)
            # optional: show ?winner's birth place (P19) as ?birth_place
            OPTIONAL {?winner wdt:P19 ?birth_place
                      # optional: show birth_place's coordinate location (P625) as ?coord
                      OPTIONAL {?birth_place wdt:P625 ?coord} }
            # optional: ?x_winner's qualifier "country for sport" (P1532) is ?country1
            OPTIONAL {?x_winner pq:P1532 ?country1}
            # optional: ?winner's country for sport (P1532) is ?country2
            OPTIONAL {?winner wdt:P1532 ?country2}
            # use IF and Exists to bind ?country1 or ?country2 as ?country:
            # if ?x_winner's qualifier "country for sport" (P1532), ?country1, exists, bind ?country1 as ?country
            # otherwise (?country1 doesn't exist), bind ?country2 as ?country
            BIND(IF(Exists{?x_winner pq:P1532 ?country1}, ?country1, ?country2) AS ?country) }
  # optional: ?x_worldGo's qualifier "start time" (P580) is ?inception1
  ### Note: Removing this line causes server error.
  OPTIONAL {?x_worldGo pq:P580 ?inception1}
  # optional: ?series's inception (P571) is ?inception2
  OPTIONAL {?series wdt:P571 ?inception2}
  # use IF and EXISTS to bind ?inception1 or ?inception2 as ?inception:
  # if ?x_worldGo's qualifier "start time" (P580), ?inception1, exists, bind ?inception1 as ?inception
  # otherwise (?inception1 doesn't exist), bind ?inception2 as ?inception
  BIND(IF(EXISTS{?x_worldGo pq:P580 ?inception1}, ?inception1, ?inception2) AS ?inception)
  # optional: ?inception_date's point in time (P585) is ?inception
  OPTIONAL {?inception_date wdt:P585 ?inception
            # ?inception_date is instance of (P31) "subclass of (P279)" [ZeroOrMorePath (*)] calendar day of a given year (Q47150325)
            ### Note: Removing FILTER(EXISTS{}) and directly using "?inception_date wdt:P31/wdt:P279* wd:Q47150325",
            ### although legitimate, causes server error, for unknown reason.
            FILTER(EXISTS{?inception_date wdt:P31/wdt:P279* wd:Q47150325})
            # optional: ?inception_date's "short name" (P1813) statement is ?x_inception_shortname
            OPTIONAL {?inception_date p:P1813 ?x_inception_shortname.
                      # ?x_inception_shortname's value is ?inception_shortname
                      ?x_inception_shortname ps:P1813 ?inception_shortname;
                                             # x_inception_shortname's qualifier "determination method" (P459) is  ISO 8601 basic format (Q97462483)
                                             pq:P459 wd:Q97462483} }
  # optional: ?series's "short name" (P1813) statement is ?x_series_shortname
  OPTIONAL {?series p:P1813 ?x_series_shortname.
            # ?x_series_shortname's value is ?series_shortname
            ?x_series_shortname ps:P1813 ?series_shortname;
                                # ?x_series_shortname's qualifier "language of work or name" (P407) is English (Q1860)
                                pq:P407 wd:Q1860}
  # concatenate ?inception_shortname, a space, and ?series_shortname as ?series_string
  BIND(CONCAT(?inception_shortname, " ", ?series_shortname) as ?series_string)
  # show label in auto language as default, and English when no default label exists
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
## 1). when using "x y" after SELECT DISTINCT, add "GROUP BY x" below;
## 2). when using "?seriesLabel..." after SELECT DISTINCT, add "GROUP BY ?seriesLabel" below;
## 4). when using "?winnerLabel..." after SELECT DISTINCT, add "GROUP BY ?winnerLabel" below

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?a") v23("?birth_date") v25("?birth_place") v5("?competition"):::projected v26("?coord"):::projected v29("?country") v27("?country1") v28("?country2") v10("?edition"):::projected v13("?end"):::projected v14("?end_year") v18("?image"):::projected v32("?inception") v30("?inception1") v31("?inception2") v1("?inception_date") v34("?inception_shortname") v8("?not") v15("?participants"):::projected v24("?pro_age"):::projected v22("?pro_start") v8("?series") v36("?series_shortname") v37("?series_string") v11("?start"):::projected v3("?start1") v2("?start2") v12("?start_year") v19("?surname") v20("?win_age"):::projected v17("?winner"):::projected v9("?worldGo") v33("?x_inception_shortname") v21("?x_pro") v35("?x_series_shortname") v16("?x_winner") v4("?x_worldGo") a3((" ")) a2((" ")) a4((" ")) a1((" ")) c36(["wd:Q97462483"]):::iri c40(["bd:serviceParam"]):::iri c15(["wd:Q10869075"]):::iri c9(["wd:Q18608583"]):::iri c38(["wd:Q1860"]):::iri c3(["wd:Q47150325"]):::iri c25(["wd:Q3186699"]):::iri c42(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?start2 < ?start1"]] e0f0 --> e0v1 e0f0 --> e0v2 e0v3 --"p:qualifier/P580"--> e0v2 e0v4 --"p:direct/P580"--> e0v1 e0v4("?competition"):::projected e0v2("?start1"):::projected e0v1("?start2"):::projected e0v3("?x_worldGo"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> v3 f0 --> v4 f0 --> c4 f0 --> v5 f0 --> c5 f1[["?start2 < ?start1"]] f1 --> v2 f1 --> v3 v4 --"p:qualifier/P580"--> v3 v5 --"p:direct/P580"--> v2 f2[["not "]] subgraph f2e1["Exists Clause"] e1f0[["?a < '9^^xsd:integer'"]] e1f0 --> e1v1 e1v2 --"p:direct/P1132"--> e1v1 e1v1("?a"):::projected e1v2("?competition"):::projected end f2--EXISTS--> f2e1 f2 --> v6 f2 --> v5 f2 --> c7 f3[["?a < '9^^xsd:integer'"]] f3 --> v6 v5 --"p:direct/P1132"--> v6 f4[["not "]] subgraph f4e2["Exists Clause"] e2v1 --"p:direct/P2094"--> e2a1 e2a1 --"p:direct/P279"--> e2v3 bind0[/VALUES ?not/] bind0-->e2v3 bind00(["wd:Q920057"]) bind00 --> bind0 bind01(["wd:Q216048"]) bind01 --> bind0 bind02(["wd:Q15991269"]) bind02 --> bind0 bind03(["wd:Q599867"]) bind03 --> bind0 bind04(["wd:Q1395783"]) bind04 --> bind0 e2v1("?competition"):::projected e2v3("?not"):::projected e2a1((" ")):::projected end f4--EXISTS--> f4e2 f4 --> v5 f4 --> c8 f4 --> a2 f4 --> c2 f4 --> v8 v5 --"p:direct/P2094"--> a2 a2 --"p:direct/P279"--> v8 bind5[/VALUES ?not/] bind5-->v8 bind50(["wd:Q920057"]) bind50 --> bind5 bind51(["wd:Q216048"]) bind51 --> bind5 bind52(["wd:Q15991269"]) bind52 --> bind5 bind53(["wd:Q599867"]) bind53 --> bind5 bind54(["wd:Q1395783"]) bind54 --> bind5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P3450"--> v8 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P31"--> v8 v8 --"p:direct/P31"--> a3 a3 --"p:direct/P279"--> c9 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v8 --"p:P279"--> v4 v4 --"p:statement/P279"--> v9 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v8 --"p:P31"--> v4 v4 --"p:statement/P31"--> v9 end union1r <== or ==> union1l end v9 --"p:direct/P279"--> c15 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P393".-> v10 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P580".-> v11 bind6[/"year-from-dateTime(?start)"/] v11 --o bind6 bind6 --as--o v12 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P582".-> v13 bind7[/"year-from-dateTime(?end)"/] v13 --o bind7 bind7 --as--o v14 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P1132".-> v15 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:P1346".-> v16 v16 --"p:statement/P1346"--> v17 subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:direct/P18".-> v18 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:direct/P734".-> v19 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v16 -."p:qualifier/P3629".-> v20 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:P106".-> v21 v21 --"p:statement/P106"--> a4 a4 --"p:direct/P279"--> c25 subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v21 -."p:qualifier/P580".-> v22 end end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:direct/P569".-> v23 end bind8[/"if((month-from-dateTime(?pro_start) > month-from-dateTime(?birth_date) || month-from-dateTime(?pro_start) = month-from-dateTime(?birth_date)day-from-dateTime(?pro_start) >= day-from-dateTime(?birth_date)),year-from-dateTime(?pro_start) - year-from-dateTime(?birth_date),year-from-dateTime(?pro_start) - year-from-dateTime(?birth_date) + '-1^^xsd:integer')"/] v22 --o bind8 v23 --o bind8 bind8 --as--o v24 subgraph optional11["(optional)"] style optional11 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:direct/P19".-> v25 subgraph optional12["(optional)"] style optional12 fill:#bbf,stroke-dasharray: 5 5; v25 -."p:direct/P625".-> v26 end end subgraph optional13["(optional)"] style optional13 fill:#bbf,stroke-dasharray: 5 5; v16 -."p:qualifier/P1532".-> v27 end subgraph optional14["(optional)"] style optional14 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:direct/P1532".-> v28 end v16 --"p:qualifier/P1532"--> v27 bind9[/"if( ,?country1,?country2)"/] subgraph bind9e3["Exists Clause"] e3v1 --"p:qualifier/P1532"--> e3v2 e3v2("?country1"):::projected e3v1("?x_winner"):::projected end bind9--EXISTS--> bind9e3 v16 --o bind9 c29 --o bind9 v27 --o bind9 v28 --o bind9 bind9 --as--o v29 end subgraph optional15["(optional)"] style optional15 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P580".-> v30 end subgraph optional16["(optional)"] style optional16 fill:#bbf,stroke-dasharray: 5 5; v8 -."p:direct/P571".-> v31 end v4 --"p:qualifier/P580"--> v30 bind10[/"if( ,?inception1,?inception2)"/] subgraph bind10e4["Exists Clause"] e4v1 --"p:qualifier/P580"--> e4v2 e4v2("?inception1"):::projected e4v1("?x_worldGo"):::projected end bind10--EXISTS--> bind10e4 v4 --o bind10 c4 --o bind10 v30 --o bind10 v31 --o bind10 bind10 --as--o v32 subgraph optional17["(optional)"] style optional17 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P585".-> v32 subgraph optional18["(optional)"] style optional18 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P1813".-> v33 v33 --"p:statement/P1813"--> v34 v33 --"p:qualifier/P459"--> c36 end end subgraph optional19["(optional)"] style optional19 fill:#bbf,stroke-dasharray: 5 5; v8 -."p:P1813".-> v35 v35 --"p:statement/P1813"--> v36 v35 --"p:qualifier/P407"--> c38 end bind11[/"concat(?inception_shortname,' ',?series_shortname)"/] v34 --o bind11 v36 --o bind11 bind11 --as--o v37 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c40 --"wikibase:language"--> c42 end