Skip to content

[HowTo] Recreation of a query #36

Description

@samwaseda

I have the following query that I would like to create with tools4RDF:

PREFIX pmd: <https://w3id.org/pmd/co/>
SELECT distinct ?p ?matDesVal
WHERE {
?p pmd:input ?s .
?p pmd:characteristic ?matDes .
?matDes a pmd:materialDesignation .
?matDes pmd:value ?matDesVal .
?s a pmd:TestPiece .
} ORDER BY ?p

Now, I tried the following command

network.create_query(network.terms.co.TestPiece, network.terms.co.value)

and got the result (Note: already the latest PR applied):

PREFIX co: <https://w3id.org/pmd/co/>
SELECT DISTINCT ?TestPiece ?valuevalue
WHERE {
    ?TestPiece co:characteristic ?co_ValueObject .
    ?co_ValueObject co:value ?valuevalue .
    ?TestPiece a co:TestPiece .
}

That looks already pretty nice, but it's still not exactly the same. Quite importantly, I haven't got the column for p yet. How can I get it included?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions