Hello Linh, <div><br></div><div>In your SELECT, you have to refer to a variable which is defined in your query.</div><div>You can't use "*" in SELECT, but only a variable (?x).</div><div><br></div><div>You should try:</div>

<div><div style="font-size: 13px; font-family: arial, sans-serif; background-color: rgb(255, 255, 255); "><b>"PREFIX rdf: <<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" target="_blank" style="color: rgb(0, 0, 204); ">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>> </b></div>

<div style="font-size: 13px; font-family: arial, sans-serif; background-color: rgb(255, 255, 255); "><b>PREFIX pizza: <<a href="http://www.co-ode.org/ontologies/pizza/pizza.owl#" target="_blank" style="color: rgb(0, 0, 204); ">http://www.co-ode.org/ontologies/pizza/pizza.owl#</a>> </b></div>

<div style="font-size: 13px; font-family: arial, sans-serif; "><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255);">SELECT </span><font class="Apple-style-span" color="#ff0000" style="background-color: rgb(255, 255, 102);">?p</font><span class="Apple-style-span" style="background-color: rgb(255, 255, 255);"> WHERE { ?p rdf:type pizza:Pizza; pizza:hasTopping ?t. ?t rdf:type pizza:TomatoTopping }"</span></b></div>

<div><br></div><div>Regards, </div><div><br></div><div>Brice</div><br><div class="gmail_quote">2011/11/29 Khánh Linh <span dir="ltr"><<a href="mailto:linhkid91@gmail.com" target="_blank">linhkid91@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Dear all,</span><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">



<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I know this maybe a stupid question but I will be very glad if someone help me with this. I'm absolutely new with Ontology. </div>



<div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Started with Pizza example. I want to list a Pizza that has Tomato Topping. And I tried this in my Protégé 3.4.7 in the SPARQL Query Panel:</div>



<div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><b>"PREFIX rdf: <<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" style="color:rgb(0,0,204)" target="_blank">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>> </b></div>



<div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><b>PREFIX pizza: <<a href="http://www.co-ode.org/ontologies/pizza/pizza.owl#" style="color:rgb(0,0,204)" target="_blank">http://www.co-ode.org/ontologies/pizza/pizza.owl#</a>> </b></div>



<div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><b>SELECT * WHERE { ?p rdf:type pizza:Pizza; pizza:hasTopping ?t. ?t rdf:type pizza:TomatoTopping }"</b></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">



<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">It returns "No matches found". </div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">



<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I don't know why the result is like that. Can you run this query and find out why it returns null ?</div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">



<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Beside, I also attach the Pizza.owl.pprj file if somebody doesn't have it.</div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">



<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I'm looking forward to hearing from you,</div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">



<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Best regrads,</div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Linh Nguyen</div>
<br>_______________________________________________<br>
protege-discussion mailing list<br>
<a href="mailto:protege-discussion@lists.stanford.edu" target="_blank">protege-discussion@lists.stanford.edu</a><br>
<a href="https://mailman.stanford.edu/mailman/listinfo/protege-discussion" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-discussion</a><br>
<br>
Instructions for unsubscribing: <a href="http://protege.stanford.edu/doc/faq.html#01a.03" target="_blank">http://protege.stanford.edu/doc/faq.html#01a.03</a><br>
<br></blockquote></div><br></div>