== Data == ||Dataset || #triples|| #subjects|| #predicates|| #objects||#types|| ||omim|| 8,750,774|| 1,013,389|| 101|| 1,415,364||34|| ||pharmgkb|| 278,049,209|| 25,325,504|| 88|| 25,684,235||50|| ||drugbank|| 3,649,750|| 316,555|| 105|| 369,947||91|| ||sider|| 17,627,864|| 1,222,429|| 39|| 648,555||16|| ||kegg|| 50,197,150|| 6,533,307|| 141|| 6,792,319||63|| == Query == ||Query|| #triplePattern|| #Result|| ||q1|| 4|| 5|| ||q2|| 9|| 40|| ||q3|| 7|| 790|| ||q4|| 8|| 9492 || ||q5|| 8|| 111962|| ||q3s|| 7|| 100|| ||q5s|| 8|| 100|| Query 1: Find the genes related to diabetes. {{{ select ?s1 ?o1 ?o2 where{ ?s1 . ?s1 ?o1. ?o1 ?o2. ?o2. } }}} Query 2: Find out the articles about GPA patients and its drug functions,clinical features. {{{ SELECT * WHERE { ?s . ?s ?o. ?s ?clinicFeature. ?s ?article. ?s ?protein. filter(regex(str(?o),"GLUCOCORTICOID-REMEDIABLE ALDOSTERONISM","i")) ?drug ?geneName. ?drug ?protein. ?drug ?genFunction. ?drug ?speFunction. } }}} Query 3: find out all the drugs, which are substrate of some enzyme, their category and reaction. {{{ PREFIX kegg: PREFIX dcterms: PREFIX drugbank: SELECT * WHERE { ?enzyme kegg:substrate ?cpd. ?enzyme . ?reaction kegg:enzyme ?enzyme. ?reaction kegg:reaction ?equation. ?drug drugbank:category ?category. ?drug dcterms:description ?desc. ?drug drugbank:x-kegg ?cpd. } }}} Query 3s: {{{ PREFIX kegg: PREFIX dcterms: PREFIX drugbank: SELECT * WHERE { ?enzyme kegg::substrate ?cpd. ?enzyme . ?reaction kegg:enzyme ?enzyme. ?reaction kegg:reaction ?equation. ?drug drugbank:category ?category. ?drug dcterms:description ?desc. ?drug drugbank:x-kegg ?cpd. } limit 100 }}} Query 4: {{{ PREFIX dcterms: PREFIX sider: PREFIX sider_vocab: PREFIX sider_resource: PREFIX drugbank: PREFIX pubchem: PREFIX dbowl: select * where{ ?drug sider_vocab:generic-name ?generic. ?drug dcterms:title ?drug_name . ?drug sider_vocab:side-effect ?side. ?drug sider_vocab:pubchem-flat-compound-id ?cpd. ?generic dcterms:title ?generic_name. ?side dcterms:title ?side_effect. ?drug_drugbank drugbank:category drugbank:Anti-Allergic-Agents. ?drug_drugbank drugbank:x-pubchemcompound ?cpd. # ?drug_drugbank drugbank:half-life ?halflife. # ?drug_drugbank drugbank:brand ?brand # ?drug_drugbank drugbank:product ?product. } }}} Query 5: Find the side effect and pathway of the anticonvulsants {{{ PREFIX dcterms: PREFIX sider: PREFIX sider_vocab: PREFIX sider_resource: PREFIX drugbank: PREFIX pubchem: PREFIX dbowl: PREFIX kegg: select * where{ ?drug_drugbank drugbank:category drugbank:Anticonvulsants. ?drug_drugbank drugbank:affected-organism ?affected. ?drug_drugbank drugbank:x-pubchemcompound ?cpd. ?drug sider_vocab:side-effect ?side. ?drug sider_vocab:pubchem-flat-compound-id ?cpd. ?side dcterms:title ?side_effect. ?drug_kegg kegg:x-pubchem.compound ?cpd. ?drug_kegg kegg:pathway ?pathway.} }}} Query 5s: add "limit 100" clause to Query 5. == Rewritten query with "service" keyword: == Query 1: Query 1': {{{ select ?s1 ?o1 ?o2 where{ service { ?o2.} service { ?s1 . ?s1 ?o1. ?o1 ?o2.} } }}} Query 1": {{{ select ?s1 ?o1 ?o2 where{ service { ?s1 . ?s1 ?o1. ?o1 ?o2.} service { ?o2.} } }}} Query 2': {{{ SELECT * WHERE { service{ ?s . ?s ?o. ?s ?clinicFeature. ?s ?article. ?s ?protein. filter(regex(str(?o),"GLUCOCORTICOID-REMEDIABLE ALDOSTERONISM","i"))} service { ?drug ?geneName. ?drug ?protein. ?drug ?genFunction. ?drug ?speFunction. } } }}} Query 2": {{{ SELECT * WHERE { service { ?drug ?geneName. ?drug ?protein. ?drug ?genFunction. ?drug ?speFunction. } service{ ?s . ?s ?o. ?s ?clinicFeature. ?s ?article. ?s ?protein. filter(regex(str(?o),"GLUCOCORTICOID-REMEDIABLE ALDOSTERONISM","i"))} } }}} Query 3': {{{ SELECT * WHERE { service { ?enzyme ?cpd. ?enzyme rdf:type . ?reaction ?enzyme. ?reaction ?equation. } service { ?drug ?cat. ?drug ?desc. ?drug ?cpd } } }}} Query 3": exchange the order of two service clauses in the query 3'. Query 4': {{{ PREFIX dcterms: PREFIX sider: PREFIX sider_vocab: PREFIX sider_resource: PREFIX bio2rdf: PREFIX pubchem: PREFIX dbowl: select * where { service { ?drug sider_vocab:generic-name ?generic; dcterms:title ?drug_name; sider_vocab:side-effect ?side. ?drug sider_vocab:pubchem-flat-compound-id ?cpd. ?generic dcterms:title ?generic_name. ?side dcterms:title ?side_effect.} service { ?drug2 . ?drug2 ?cpd. } } }}} Query 4": exchange the order of two service clauses in the query 4'. Query 5': {{{ PREFIX dcterms: PREFIX sider: PREFIX sider_vocab: PREFIX sider_resource: PREFIX drugbank: PREFIX pubchem: PREFIX dbowl: PREFIX kegg: select * where{ service{ ?drug_drugbank drugbank:category drugbank:Anticonvulsants. ?drug_drugbank drugbank:affected-organism ?affected. ?drug_drugbank drugbank:x-pubchemcompound ?cpd.} service {?drug_kegg kegg:x-pubchem.compound ?cpd. ?drug_kegg kegg:pathway ?pathway.} service { ?drug sider_vocab:side-effect ?side. ?side dcterms:title ?side_effect. ?drug sider_vocab:pubchem-flat-compound-id ?cpd.} } }}} Query 5": Change the order of the first two service clauses in the query 5'.