Difference between revisions of "Q3.6"

From BITPlan cr Wiki
Jump to navigation Jump to search
 
Line 3: Line 3:
 
{{Query
 
{{Query
 
|id=6
 
|id=6
 +
|name=AuthorActivityInYear
 
|title=Overall activity in a year
 
|title=Overall activity in a year
 
|description=Identify for an author A of a CEUR-WS.org paper P all his/her activity in year Y .
 
|description=Identify for an author A of a CEUR-WS.org paper P all his/her activity in year Y .
Line 9: Line 10:
  
 
SELECT
 
SELECT
 +
  (MIN(?_year) as ?year)
 
   (MIN(?dates) AS ?date)
 
   (MIN(?dates) AS ?date)
 
   ?work ?workLabel
 
   ?work ?workLabel
Line 15: Line 17:
 
   ?venue ?venueLabel
 
   ?venue ?venueLabel
 
   (GROUP_CONCAT(DISTINCT ?author_label; separator=", ") AS ?authors)
 
   (GROUP_CONCAT(DISTINCT ?author_label; separator=", ") AS ?authors)
  (CONCAT("../authors/", GROUP_CONCAT(DISTINCT SUBSTR(STR(?author), 32); separator=",")) AS ?authorsUrl)
 
 
WHERE {
 
WHERE {
 
   ?work wdt:P50 target: .
 
   ?work wdt:P50 target: .
Line 26: Line 27:
 
   ?work wdt:P577 ?datetimes .
 
   ?work wdt:P577 ?datetimes .
 
   BIND(xsd:date(?datetimes) AS ?dates)
 
   BIND(xsd:date(?datetimes) AS ?dates)
 +
  BIND(year(?dates) as ?_year)
 +
 +
 
   OPTIONAL { ?work wdt:P1104 ?pages_ }
 
   OPTIONAL { ?work wdt:P1104 ?pages_ }
 
   OPTIONAL { ?work wdt:P1433 ?venue }
 
   OPTIONAL { ?work wdt:P1433 ?venue }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,no,ru,sv,zh". } 
+
   ?work rdfs:label ?workLabel
 +
  FILTER(LANG(?workLabel)="en")
 
}
 
}
 
GROUP BY ?work ?workLabel ?venue ?venueLabel
 
GROUP BY ?work ?workLabel ?venue ?venueLabel
 
ORDER BY DESC(?date)
 
ORDER BY DESC(?date)
 +
|wdqsurl=6UTP
 
|scholia=author_list-of-publications.sparql
 
|scholia=author_list-of-publications.sparql
 
|relevance=3
 
|relevance=3

Latest revision as of 07:48, 22 March 2023

Query

Query
edit
id  6
name  AuthorActivityInYear
title  Overall activity in a year
description  Identify for an author A of a CEUR-WS.org paper P all his/her activity in year Y .
sparql  
#defaultView:Table
PREFIX target: <http://www.wikidata.org/entity/Q27942628>

SELECT
  (MIN(?_year) as ?year)
  (MIN(?dates) AS ?date)
  ?work ?workLabel
  (GROUP_CONCAT(DISTINCT ?type_label; separator=", ") AS ?type)
  (SAMPLE(?pages_) AS ?pages)
  ?venue ?venueLabel
  (GROUP_CONCAT(DISTINCT ?author_label; separator=", ") AS ?authors)
WHERE {
  ?work wdt:P50 target: .
  ?work wdt:P50 ?author .
  OPTIONAL {
    ?author rdfs:label ?author_label_ . FILTER (LANG(?author_label_) = 'en')
  }
  BIND(COALESCE(?author_label_, SUBSTR(STR(?author), 32)) AS ?author_label)
  OPTIONAL { ?work wdt:P31 ?type_ . ?type_ rdfs:label ?type_label . FILTER (LANG(?type_label) = 'en') }
  ?work wdt:P577 ?datetimes .
  BIND(xsd:date(?datetimes) AS ?dates)
  BIND(year(?dates) as ?_year)

 
  OPTIONAL { ?work wdt:P1104 ?pages_ }
  OPTIONAL { ?work wdt:P1433 ?venue }
  ?work rdfs:label ?workLabel
  FILTER(LANG(?workLabel)="en")
}
GROUP BY ?work ?workLabel ?venue ?venueLabel
ORDER BY DESC(?date)
tryiturl  →
wdqsurl  6UTP→6UTP
scholia  author_list-of-publications.sparql→author_list-of-publications.sparql
relevance  3
comment  
task  Task3→Task3

Freitext