Questions Re: AnzoGraph Tutorial SPARQL Queries

47 Views Asked by At

I'm going through the AnzoGraph tutorial. I have 2 questions: 1) They often use desc, e.g. desc(?sum) in the Order By or other parts of the query. I'm not familiar with this and didn't find much help in the SPARQL documentation. What does desc do and why is it needed? 2) Sometimes, when I would expect to see a number in the output I see an alphanumeric string. E.g., in the query:

SELECT ?location ?kind ?name ?list_date (((?selldate - ?list_date)) as ?sale_age)
FROM <tickit>
WHERE {
  ?sale <saletime> ?selldate .
  ?sale <eventid> ?event .
  ?listing <eventid> ?event .
  ?listing <listtime> ?list_date .
  ?event <eventname> ?name .
  ?event <venueid> ?venue .
  ?event <catid> ?cat .
  ?cat <catname> ?kind .
  ?venue <venuename> ?location .
}
ORDER BY desc(?selldate) desc(?list_date) ?location ?kind ?name

I expect to see ?sale_age as an an integer but it is displayed as alphanumerics such as: P1DT1H50M.

0

There are 0 best solutions below