From 55a5237e7ece9ae9a11c2b1ed72d202fdb7957ac Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Tue, 17 Feb 2015 14:48:32 +0100 Subject: [PATCH] MPSPARQL-7: Deduplicate the $work Will only list one line for each $work we find. So we only get one author, title, and subject. --- bibframe/triplestore.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index db8aae6..ff4498a 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -3,7 +3,12 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?work ?wtitle ?creatorlabel ?subjectlabel
+
SELECT + ?work + MAX(?wtitle) AS ?title + MAX(?creatorlabel) AS ?creator + MAX(?subjectlabel) AS ?subject +
?work a bf:Work OPTIONAL { @@ -27,6 +32,7 @@ UNION { ?subject bf:label %v FILTER(contains(%v, %s)) } } + GROUP BY $work
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns -- 1.7.10.4