owlim-discussion  

[Owlim-discussion] Counting soundtrack's tracks

Adam Coen
Mon, 21 Jun 2010 07:07:14 -0700

Hi, I'd like to count the number of tracks included for each soundtrack
album in freebase.
Using FactForge sparql end-point first I select movies from DBpedia, then I
use the freebase URI to get to the soundtrack page:

PREFIX fb-film: <http://rdf.freebase.com/ns/film.film.>
PREFIX db-ont: <http://dbpedia.org/ontology/>
PREFIX db-work: <http://dbpedia.org/ontology/Work/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT  ?id ?uriOST
 WHERE {
?id rdf:type db-ont:Film .
?id owl:sameAs ?uriFB .
?id db-ont:releaseDate ?data_uscita .
?id db-work:runtime ?durata .
?id db-ont:gross ?incasso .
?uriFB fb-film:soundtrack ?uriOST .

FILTER regex(str(?uriFB),"freebase")
}

LIMIT 300

Now I'd like to count the number of tracks which the soundtrack is composed
by, but I really don't know how since FactForge doesn't accept neither COUNT
nor GROUP BY.
Could anybody help me?
_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion