query-a0eb9bdc0e1b4c8d83fe8bdf82340dd2

rq turtle/ttl

List of clinical trials SELECT ?item ?nct_id ?itemLabel ?phaseLabel ?enrollment ?start_date ?primary_completion_date WHERE { ?item p:P31/ps:P31/wdt:P279* wd:Q30612. ?item wdt:P3098 ?nct_id . OPTIONAL { ?item wdt:P580 ?start_date } OPTIONAL { ?item wdt:P582 ?primary_completion_date } OPTIONAL { ?item wdt:P6099 ?phase } OPTIONAL { ?item wdt:P1132 ?enrollment } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# List of clinical trials
SELECT ?item ?nct_id ?itemLabel ?phaseLabel ?enrollment ?start_date ?primary_completion_date
WHERE
{
   ?item p:P31/ps:P31/wdt:P279* wd:Q30612.
   ?item wdt:P3098 ?nct_id .
   OPTIONAL { ?item wdt:P580  ?start_date }
   OPTIONAL { ?item wdt:P582 ?primary_completion_date }
   OPTIONAL { ?item wdt:P6099 ?phase }
   OPTIONAL { ?item wdt:P1132 ?enrollment }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?enrollment"):::projected v1("?item"):::projected v2("?nct_id"):::projected v5("?phase") v4("?primary_completion_date"):::projected v3("?start_date"):::projected a1((" ")) a2((" ")) c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q30612"]):::iri v1 --"p:P31"--> a1 a1 --"p:statement/P31"--> a2 a2 --"p:direct/P279"--> c4 v1 --"p:direct/P3098"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P580".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P582".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P6099".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1132".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end