Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6968045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:24:01+00:00 2026-05-27T16:24:01+00:00

I am a beginner to SPARQL and was wondering if there was a query

  • 0

I am a beginner to SPARQL and was wondering if there was a query which could help me return transitive relations. For example the n3 file below I would want a query that would return “a is the sameas c” or something along those lines. Thanks

@prefix : <http://websitename.com/links/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

:a owl:sameas :b.
:b owl:sameas :c.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:24:02+00:00Added an answer on May 27, 2026 at 4:24 pm

    You can use property paths if you are using a suitably enabled SPARQL 1.1 engine, you’ve tagged your question Jena so I assume you are using its ARQ engine which supports this feature.

    So you can write a query like the following:

    PREFIX owl: <http://www.w3.org/2002/07/owl#>
    SELECT *
    WHERE
    {
      ?x owl:sameAs+ ?y
    }
    

    Note the + after the predicate, used to indicate that it should look for relationships composed of one/more steps.

    The syntax for property paths can be found here and is very regular expression like. The only downside of queries using this is that you don’t get any information about how long the paths are or what the intermediate nodes are.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Beginner help needed :) I am doign an example form a php book which
Beginner rails question: How does one return a file from a controller in rails?
Beginner to assembly programming for x86. I have a simple asm file which I
Beginner Question. Below is an example given on the Cradle CouchDB documentation: https://github.com/cloudhead/cradle What
JS beginner here. I need help with a script to place different content in
Beginner here, I have a simple question. In Android what would be the best
A beginner's question about Lua and metatables , with a example as simple as
Beginner here See - http://www.w3schools.com/js/tryit.asp?filename=try_dom_tablerow_cells In this example, when change content is pressed, new
Im beginner in android development. I ve just created a button in main.xml file
VS beginner question. How to change parent control of a control? Example. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.