Skip to content
Eugene Cherny edited this page May 16, 2015 · 1 revision

Q1.1

SELECT ?proc ?editor_name WHERE {
    VALUES ?proc {
        <http://ceur-ws.org/Vol-1085/>
        <http://ceur-ws.org/Vol-1010/>
        <http://ceur-ws.org/Vol-1008/>
        <http://ceur-ws.org/Vol-981/>
        <http://ceur-ws.org/Vol-906/>
        <http://ceur-ws.org/Vol-859/>
        <http://ceur-ws.org/Vol-784/>
        <http://ceur-ws.org/Vol-540/>
        <http://ceur-ws.org/Vol-369/>
        <http://ceur-ws.org/Vol-232/>
        <http://ceur-ws.org/Vol-225/>
        <http://ceur-ws.org/Vol-44/>
        <http://ceur-ws.org/Vol-11/>
        <http://ceur-ws.org/Vol-1/>
    }
    ?proc   swrc:editor ?editor .
    ?editor foaf:name   ?editor_name .
}

Q1.2

SELECT ?proc (count(?pub) AS ?paper_count) {
    VALUES ?proc {
        <http://ceur-ws.org/Vol-1/>
        <http://ceur-ws.org/Vol-11/>
        <http://ceur-ws.org/Vol-44/>
        <http://ceur-ws.org/Vol-49/>
        <http://ceur-ws.org/Vol-104/>
        <http://ceur-ws.org/Vol-232/>
        <http://ceur-ws.org/Vol-304/>
        <http://ceur-ws.org/Vol-353/>
        <http://ceur-ws.org/Vol-538/>
        <http://ceur-ws.org/Vol-658/>
        <http://ceur-ws.org/Vol-721/>
        <http://ceur-ws.org/Vol-958/>
        <http://ceur-ws.org/Vol-979/>
        <http://ceur-ws.org/Vol-994/>
        <http://ceur-ws.org/Vol-1008/>
        <http://ceur-ws.org/Vol-1123/>
    }
    ?pub dcterms:partOf ?proc .
}
GROUP BY ?proc

Q1.3

SELECT DISTINCT ?proc ?creator_name WHERE {
    VALUES ?proc {
        <http://ceur-ws.org/Vol-1085/>
        <http://ceur-ws.org/Vol-1044/>
        <http://ceur-ws.org/Vol-994/>
        <http://ceur-ws.org/Vol-919/>
        <http://ceur-ws.org/Vol-902/>
        <http://ceur-ws.org/Vol-778/>
        <http://ceur-ws.org/Vol-571/>
        <http://ceur-ws.org/Vol-232/>
    } .
    ?pub dcterms:partOf ?proc ;
         dc:creator ?creator .
    ?creator foaf:name ?creator_name .
}

Q1.4

SELECT ?proc (AVG(?pages) AS ?avg) {
  VALUES ?proc {
    <http://ceur-ws.org/Vol-1085/>
    <http://ceur-ws.org/Vol-994/>
    <http://ceur-ws.org/Vol-571/>
  }
  ?proc dcterms:hasPart ?pub .
  ?pub bibo:numPages ?pages .
}
GROUP BY ?proc

Q1.5

SELECT ?proc ?result {
 VALUES ?proc {
    <http://ceur-ws.org/Vol-1085/>
    <http://ceur-ws.org/Vol-1/>
    <http://ceur-ws.org/Vol-869/>
    <http://ceur-ws.org/Vol-736/>
    <http://ceur-ws.org/Vol-721/>
    <http://ceur-ws.org/Vol-718/>
    <http://ceur-ws.org/Vol-315/>
    <http://ceur-ws.org/Vol-232/>
 }
 ?proc bibo:presentedAt ?workshop ;
       dcterms:issued ?issued .
 { ?workshop timeline:atDate ?date }
 UNION
 { ?workshop timeline:beginsAtDateTime ?date }
 BIND(bound(?date) && YEAR(?date) >= YEAR(?issued) && (MONTH(?date) = MONTH(?issued) && DAY(?date) >= DAY(?issued) || MONTH(?date) > MONTH(?issued)) AS ?result)
}

Q1.6

SELECT (STRDT(?search, xsd:string) AS ?search_a) ?proc WHERE {
    VALUES ?search {
        "Linked Data on the Web"
        "Workshop on Modular Ontologies"
        "Information Technologies - Applications and Theory"
        "iStar"
        "Neural-Symbolic Learning and Reasoning"
        "Decision Support in Software Engineering"
        "Enterprise Modelling and Ontologies for Interoperability"
        "Model Driven Development of Advanced User Interfaces"
    }
    ?workshop a bibo:Workshop;
            swrc:eventTitle ?label .
    ?proc a swrc:Proceedings ;
        bibo:presentedAt ?workshop .
    FILTER(strStarts(?label, ?search)) .
}

Q1.7

SELECT (STRDT(?search, xsd:string) AS ?search_a) ?editor_name WHERE {
  {
    SELECT ?search ?workshop ?editor WHERE {
        VALUES ?search {
            "Linked Data on the Web"
            "Semantic Publishing"
            "Uncertainty Reasoning for the Semantic Web"
            "Neural-Symbolic Learning and Reasoning"
            "Workshop on Formal Models"
            "Enterprise Modelling and Ontologies for Interoperability"
            "Ontologies and their Applications"
            "Web Oriented Software Technologies"
            "Philosophy and Informatics"
            "Peer-to-Peer Knowledge Management"
            "Modeling and Retrieval of Context"
            "Popularize Artificial Intelligence"
        } .
      ?workshop a bibo:Workshop;
                rdfs:label ?label .
      FILTER(strStarts(?label, ?search)) .
      [] a swrc:Proceedings;
                           bibo:presentedAt ?workshop;
                           swrc:editor ?editor .
    }
  }
  {
    SELECT ?search (COUNT(?workshop) AS ?count) WHERE {
        VALUES ?search {
            "Linked Data on the Web"
            "Semantic Publishing"
            "Uncertainty Reasoning for the Semantic Web"
            "Neural-Symbolic Learning and Reasoning"
            "Workshop on Formal Models"
            "Enterprise Modelling and Ontologies for Interoperability"
            "Ontologies and their Applications"
            "Web Oriented Software Technologies"
            "Philosophy and Informatics"
            "Peer-to-Peer Knowledge Management"
            "Modeling and Retrieval of Context"
            "Popularize Artificial Intelligence"
        } .
        ?workshop a bibo:Workshop;
                rdfs:label ?label .
        FILTER(strStarts(?label, ?search)) .
    }
    GROUP BY ?search
  }
  ?editor foaf:name ?editor_name .
}
GROUP BY ?search ?editor_name ?count
HAVING (str(COUNT(?search)) = str(?count))

Q1.8

SELECT ?conf_name (YEAR(?conf_year) AS ?conf_year_int) ?proc WHERE {
  {
    ?conf a swc:OrganizedEvent;
          rdfs:label "LPNMR"^^xsd:string ;
          rdfs:label ?conf_name ;
          timeline:atDate "2013"^^xsd:gYear ;
          timeline:atDate ?conf_year .
  }
  UNION
  {
    ?conf a swc:OrganizedEvent;
          rdfs:label "WWW"^^xsd:string ;
          rdfs:label ?conf_name ;
          timeline:atDate "2012"^^xsd:gYear ;
          timeline:atDate ?conf_year .
  }
  ?workshop a bibo:Workshop;
            swc:isSubEventOf ?conf .
  ?proc a swrc:Proceedings ;
        bibo:presentedAt ?workshop .
}

Q1.9

SELECT DISTINCT ?proc ?pub WHERE {
    VALUES ?proc {
        <http://ceur-ws.org/Vol-1123/>
        <http://ceur-ws.org/Vol-1116/>
        <http://ceur-ws.org/Vol-1081/>
        <http://ceur-ws.org/Vol-1008/>
        <http://ceur-ws.org/Vol-902/>
        <http://ceur-ws.org/Vol-900/>
        <http://ceur-ws.org/Vol-890/>
        <http://ceur-ws.org/Vol-856/>
        <http://ceur-ws.org/Vol-843/>
        <http://ceur-ws.org/Vol-809/>
        <http://ceur-ws.org/Vol-736/>
        <http://ceur-ws.org/Vol-721/>
        <http://ceur-ws.org/Vol-671/>
        <http://ceur-ws.org/Vol-669/>
        <http://ceur-ws.org/Vol-232/>
        <http://ceur-ws.org/Vol-1/>
    }
    ?proc swrc:editor ?editor .
    ?editor a foaf:Agent ;
            foaf:name ?editor_name .
    ?pub a foaf:Document ;
         dcterms:partOf ?proc .
    ?author a foaf:Agent ;
            foaf:made ?pub ;
            foaf:name ?author_name .
    FILTER(REGEX(?author_name, CONCAT(".*", REPLACE(?editor_name, "[. ']+", ".*"), ".*"), "i")) .
}

Q1.10

SELECT ?proc ?author_name {
  VALUES ?proc {
    <http://ceur-ws.org/Vol-1085/>
    <http://ceur-ws.org/Vol-1081/>
    <http://ceur-ws.org/Vol-1014/>
    <http://ceur-ws.org/Vol-1008/>
    <http://ceur-ws.org/Vol-994/>
    <http://ceur-ws.org/Vol-937/>
    <http://ceur-ws.org/Vol-936/>
    <http://ceur-ws.org/Vol-875/>
    <http://ceur-ws.org/Vol-859/>
    <http://ceur-ws.org/Vol-846/>
    <http://ceur-ws.org/Vol-745/>
    <http://ceur-ws.org/Vol-573/>
    <http://ceur-ws.org/Vol-477/>
    <http://ceur-ws.org/Vol-353/>
    <http://ceur-ws.org/Vol-250/>
    <http://ceur-ws.org/Vol-81/>
    <http://ceur-ws.org/Vol-53/>
    <http://ceur-ws.org/Vol-33/>
    <http://ceur-ws.org/Vol-22/>
    <http://ceur-ws.org/Vol-1/>
  }
  ?proc dcterms:hasPart ?pub .
  ?pub a swc:InvitedPaper .
  ?author foaf:made ?pub ;
          foaf:name ?author_name .
}

Q1.11

SELECT (STRDT(?prefix, xsd:string) AS ?prefix_a) (SUM(?edition) AS ?edition_count) {
  {
    SELECT ?prefix (MAX(?edition) AS ?max_edition) {
      VALUES ?prefix {
        "Linked Data on the Web"
        "Workshop on Modular Ontologies"
        "Information Technologies - Applications and Theory"
        "iStar"
        "Neural-Symbolic Learning and Reasoning"
        "Decision Support in Software Engineering"
        "Enterprise Modelling and Ontologies for Interoperability"
        "Model Driven Development of Advanced User Interfaces"
      }
      ?workshop a bibo:Workshop ;
        rdfs:label ?workshop_name .
      OPTIONAL { ?workshop swrc:edition ?e . }
      BIND (IF(bound(?e), ?e, 1) AS ?edition)
      FILTER(STRSTARTS(?workshop_name, ?prefix))
    }
    GROUP BY ?prefix
  }
  {
    SELECT ?prefix ?edition {
      VALUES ?prefix {
        "Linked Data on the Web"
        "Workshop on Modular Ontologies"
        "Information Technologies - Applications and Theory"
        "iStar"
        "Neural-Symbolic Learning and Reasoning"
        "Decision Support in Software Engineering"
        "Enterprise Modelling and Ontologies for Interoperability"
        "Model Driven Development of Advanced User Interfaces"
      }
      ?workshop a bibo:Workshop ;
        rdfs:label ?workshop_name .
      OPTIONAL { ?workshop swrc:edition ?e . }
      BIND (IF(bound(?e), ?e, 1) AS ?edition)
      FILTER(STRSTARTS(?workshop_name, ?prefix))
    }
  }
  FILTER(?max_edition = ?edition)
}
GROUP BY ?prefix

Q1.12

SELECT ?proc ?name ?proc_first {
  {
    SELECT ?proc (MIN(?date) AS ?min_date) {
      VALUES ?proc {
        <http://ceur-ws.org/Vol-1186/>
        <http://ceur-ws.org/Vol-1128/>
        <http://ceur-ws.org/Vol-1074/>
        <http://ceur-ws.org/Vol-1049/>
        <http://ceur-ws.org/Vol-943/>
        <http://ceur-ws.org/Vol-784/>
        <http://ceur-ws.org/Vol-862/>
        <http://ceur-ws.org/Vol-115/>
      }
      ?proc bibo:presentedAt|bibo:presentedAt/rdfs:seeAlso ?workshop .
      { ?workshop timeline:atDate ?date . }
      UNION
      { ?workshop timeline:beginsAtDateTime ?date . }
    }
    GROUP BY ?proc
  }
  ?proc bibo:presentedAt|bibo:presentedAt/rdfs:seeAlso ?workshop .
  ?workshop swrc:eventTitle ?name .
  { ?workshop timeline:atDate ?date . }
  UNION
  { ?workshop timeline:beginsAtDateTime ?date . }
  ?proc_first bibo:presentedAt ?workshop .
  FILTER(?date = ?min_date)
}

Q1.13

SELECT DISTINCT (STRDT(?acrn, xsd:string) AS ?acrn_str) (YEAR(?conf_date) AS ?conf_date_int) ?proc {
  VALUES (?acrn ?year) {
    ("ISWC" "2012")
  }
  ?conf a swc:OrganizedEvent ;
        rdfs:label ?conf_name ;
        timeline:atDate ?conf_date .
  ?workshop swc:isSubEventOf ?conf .
  ?proc bibo:presentedAt ?workshop .
  FILTER( ?conf_name = ?acrn && STR(YEAR(?conf_date)) = ?year )
  FILTER EXISTS { ?workshop rdfs:seeAlso [] . }
  FILTER NOT EXISTS { [] rdfs:seeAlso ?workshop . }
}

Q1.14

SELECT (STRDT(?acrn, xsd:string) AS ?acrn_str) ?proc ?publication {
  VALUES (?acrn ?proc) {
    ("BeRSys" <http://ceur-ws.org/Vol-981/>)
    ("MathUI" <http://ceur-ws.org/Vol-1186/>)
    ("FEOSW" <http://ceur-ws.org/Vol-862/>)
  }
  ?workshop bibo:shortTitle ?w_title .
  ?publication a swrc:InProceedings ;
               bibo:presentedAt ?workshop .
  FILTER(?w_title = ?acrn)
}

Q1.15

SELECT (STRDT(?acrn, xsd:string) AS ?acrn_str) ?proc ?chair_name {
    VALUES (?acrn ?proc) {
        ("BeRSys" <http://ceur-ws.org/Vol-981/>)
    }
    ?w a bibo:Workshop ;
        rdfs:label | bibo:shortTitle ?w_name ;
        swc:hasRole / swc:heldBy ?chair .
    ?chair foaf:name ?chair_name .
    ?proc bibo:presentedAt ?w .
    FILTER(?w_name = ?acrn)
}
LIMIT 10

Q1.16

SELECT (STRDT(?acrn, xsd:string) AS ?acrn_str) (YEAR(?cr_date) AS ?date) ?pr {
  ?c a swc:OrganizedEvent ;
        rdfs:label ?c_name ;
        timeline:atDate ?c_date .
  ?cr a swc:OrganizedEvent ;
        rdfs:label ?cr_name ;
        timeline:atDate ?cr_date .
  ?w a bibo:Workshop ;
     swc:isSubEventOf ?c .
  ?wr skos:related ?w ;
      swc:isSubEventOf ?cr .
  ?p a swrc:Proceedings ;
     bibo:presentedAt ?w .
  ?pr a swrc:Proceedings ;
      bibo:presentedAt ?wr .
  {
    SELECT ?p (COUNT(?pub) AS ?p_num_pubs) {
      ?p dcterms:hasPart ?pub .
      ?pub a swrc:InProceedings .
    }
    GROUP BY ?p
  }
  {
    SELECT ?pr (COUNT(?pub) AS ?pr_num_pubs) {
      ?pr dcterms:hasPart ?pub .
      ?pub a swrc:InProceedings .
    }
    GROUP BY ?pr
  }
  {
    SELECT ?acrn ?year (MAX(?pr_num_pubs-?p_num_pubs) AS ?max_diff) {
        VALUES (?acrn ?year) {
        ("WWW" "2012")
      }
      ?c a swc:OrganizedEvent ;
            rdfs:label ?c_name ;
            timeline:atDate ?c_date .
      ?cr a swc:OrganizedEvent ;
            rdfs:label ?cr_name ;
            timeline:atDate ?cr_date .
      ?w a bibo:Workshop ;
         swc:isSubEventOf ?c .
      ?wr skos:related ?w ;
          swc:isSubEventOf ?cr .
      ?p a swrc:Proceedings ;
         bibo:presentedAt ?w .
      ?pr a swrc:Proceedings ;
          bibo:presentedAt ?wr .
      {
        SELECT ?p (COUNT(?pub) AS ?p_num_pubs) {
          ?p dcterms:hasPart ?pub .
          ?pub a swrc:InProceedings .
        }
        GROUP BY ?p
      }
      {
        SELECT ?pr (COUNT(?pub) AS ?pr_num_pubs) {
          ?pr dcterms:hasPart ?pub .
          ?pub a swrc:InProceedings .
        }
        GROUP BY ?pr
      }
      FILTER(?c_name = ?acrn && ?cr_name = ?acrn && STR(YEAR(?c_date)) = ?year && ?c_date < ?cr_date)
    }
    GROUP BY ?acrn ?year
  }
  FILTER(?c_name = ?acrn && ?cr_name = ?acrn && STR(YEAR(?c_date)) = ?year && ?c_date < ?cr_date && (?pr_num_pubs - ?p_num_pubs) = ?max_diff)
}

Q1.17

SELECT (STRDT(?acrn, xsd:string) AS ?acrn_str) (YEAR(?c_date) AS ?c_year) ?w_name {
  VALUES (?acrn ?year) {
    ("ISWC" "2012")
    ("FOIS" "2012")
    ("ESWC" "2012")
  }
  ?c a swc:OrganizedEvent ;
     rdfs:label ?c_name ;
     timeline:atDate ?c_date .
  ?w a bibo:Workshop ;
     swc:isSubEventOf ?c .
  OPTIONAL { ?w  bibo:shortTitle ?w_name } OPTIONAL { ?w rdfs:label ?w_name }
  {
    SELECT ?w (MAX(?date) AS ?prev_date) {
      ?wr a bibo:Workshop ;
          timeline:atDate | timeline:beginsAtDateTime ?date .
      ?w rdfs:seeAlso ?wr .
    }
    GROUP BY ?w
  }
  ?w rdfs:seeAlso ?wr .
  ?wr timeline:atDate | timeline:beginsAtDateTime ?wr_date ;
      swc:isSubEventOf ?cr .
  ?cr a swc:OrganizedEvent ;
      rdfs:label ?cr_name .
  FILTER(?c_name = ?acrn && STR(YEAR(?c_date)) = ?year && ?cr_name != ?acrn &&
?wr_date = ?prev_date)
}

Q1.18

SELECT (STRDT(?prefix, xsd:string) AS ?prefix_str) (YEAR(?prev) AS ?p) (YEAR(?date) AS ?d) {
	{
    	SELECT ?prefix ?x (MAX(?y_date) as ?prev) {
            VALUES ?prefix {
              "Linked Data on the Web"
              "Workshop on Modular Ontologies"
              "High-Performance Computing for the Semantic Web"
            }
            ?x a bibo:Workshop ;
              rdfs:label ?x_name ;
              timeline:atDate | timeline:beginsAtDateTime ?x_date ;
              rdfs:seeAlso ?y .
            ?y a bibo:Workshop ;
              rdfs:label ?y_name ;
              timeline:atDate | timeline:beginsAtDateTime ?y_date .
      		FILTER(CONTAINS(?x_name, ?prefix) || CONTAINS(?y_name, ?prefix))
      	}
    	GROUP BY ?prefix ?x
	}
  	?x timeline:atDate | timeline:beginsAtDateTime ?date .
  	FILTER(ABS(MONTH(?date) - MONTH(?prev))>=2)
}
Clone this wiki locally