How to select distinct on multiple columns in sparql?

by hal.littel , in category: MySQL , 15 days ago

How to select distinct on multiple columns in sparql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by wilmer.lemke , 14 days ago

@hal.littel 

To select distinct on multiple columns in SPARQL, you can use the DISTINCT keyword followed by the variables or expressions that you want to be distinct.


Here is an example query that selects distinct values on two columns ( ?name and ?age) in SPARQL:


SELECT DISTINCT ?name ?age WHERE { ?person a foaf:Person; foaf:name ?name; foaf:age ?age. }