forked from ldbc/ldbc_snb_interactive_v1_impls
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbi-20.sparql
24 lines (22 loc) · 915 Bytes
/
bi-20.sparql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX sn: <http://www.ldbc.eu/ldbc_socialnet/1.0/data/>
PREFIX snvoc: <http://www.ldbc.eu/ldbc_socialnet/1.0/vocabulary/>
PREFIX sntag: <http://www.ldbc.eu/ldbc_socialnet/1.0/tag/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
SELECT ?tagClassName (COUNT(DISTINCT ?message) AS ?messageCount)
WHERE
{
VALUES (?tagClassName) {$tagClasses}
VALUES (?type) {(snvoc:Post) (snvoc:Comment)}
?message a ?type .
?message snvoc:hasTag/a ?tagClass .
?tagClass a snvoc:TagClass .
?tagClass rdfs:subClassOf* ?parentTagClass .
?parentTagClass rdfs:label ?tagClassName
}
GROUP BY ?tagClassName
ORDER BY DESC(?messageCount) ?tagClassName