# Problem with running query

**URL:** <https://community.stardog.com/t/problem-with-running-query/4837>\
**Category:** Support\
**Created:** [February 12, 2024, 2:11am UTC](https://community.stardog.com/t/problem-with-running-query/4837 "2024-02-12T02:11:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mponios.giannis](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mponios.giannis/32/2061_2.png) [@mponios.giannis](https://community.stardog.com/u/mponios.giannis)\
**Post date:** [February 12, 2024, 2:11am UTC](https://community.stardog.com/t/problem-with-running-query/4837/1 "2024-02-12T02:11:29Z")

</div>

Hello i have created a project in designer with classes and csv files and trying to run a simple query like this in studio  
SELECT ?student  
WHERE {  
?student rdf:type :student .  
}  
but i dont get the 2 instances from student class even tho i can see them when i open explorer and press expand by-\> instances of  
do i miss sothing?

---

<div class="post-metadata">

**Author:** ![Laura\_Firey](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/laura_firey/32/635_2.png) [@Laura\_Firey](https://community.stardog.com/u/Laura_Firey)\
**Post date:** [February 26, 2024, 11:38pm UTC](https://community.stardog.com/t/problem-with-running-query/4837/2 "2024-02-26T23:38:30Z")

</div>

The SPARQL query likely does not align with your data. Please note the defined data model created in Designer, uses the definitions outlined in our docs [here](https://docs.stardog.com/stardog-applications/designer/#created-model-definition). Classes are defined by `http://www.w3.org/2002/07/owl#Class`.

You will also want to confirm you are referencing the class you defined correctly, `:student` is likely not the full IRI created by Designer for the class definition. You can confirm the full IRI in the ttl export from your Designer project.

---

<div class="post-metadata">

**Author:** ![mponios.giannis](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mponios.giannis/32/2061_2.png) [@mponios.giannis](https://community.stardog.com/u/mponios.giannis)\
**Post date:** [March 3, 2024, 12:22am UTC](https://community.stardog.com/t/problem-with-running-query/4837/3 "2024-03-03T00:22:34Z")

</div>

thanks i just placed a line with prefix before the query and it runs  
should i have this line every time i try run a query?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [April 30, 2024, 11:50pm UTC](https://community.stardog.com/t/problem-with-running-query/4837/4 "2024-04-30T23:50:41Z")

</div>



---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [May 26, 2024, 11:25am UTC](https://community.stardog.com/t/problem-with-running-query/4837/5 "2024-05-26T11:25:11Z")

</div>

Yes, you'll need that with every query. Stardog can also store common prefixes that will be used with every query. See the 'namespace' command [namespace | Stardog Documentation Latest](https://docs.stardog.com/stardog-cli-reference/namespace/) Although your queries will not be portable and subject to being broken by changes to the stored namespace. Using it will depend on your use case.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [November 23, 2024, 3:57am UTC](https://community.stardog.com/t/problem-with-running-query/4837/6 "2024-11-23T03:57:05Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 18, 2025, 5:13am UTC](https://community.stardog.com/t/problem-with-running-query/4837/7 "2025-06-18T05:13:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [February 5, 2026, 8:32am UTC](https://community.stardog.com/t/problem-with-running-query/4837/8 "2026-02-05T08:32:32Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 12, 2026, 4:06pm UTC](https://community.stardog.com/t/problem-with-running-query/4837/9 "2026-10-12T16:06:20Z")

</div>


