SPARQL Conferences

From BITPlan cr Wiki
Revision as of 09:59, 11 July 2024 by Wf (talk | contribs)
Jump to navigation Jump to search
# SPARQL Query to Retrieve Details of Key Academic Conferences Related to the Semantic Web and Knowledge Representation
# This query fetches essential information about each conference series including its title, official homepage, DBLP venue ID, 
# and a concatenated list of main subjects. The information is sourced from the Wikidata entries for each conference.

SELECT 
  ?conference 
  ?conferenceLabel 
  ?title 
  ?officialHomepage 
  ?descriptionURL 
  ?dblpVenueID 
  (GROUP_CONCAT(DISTINCT ?mainSubjectLabel; separator=", ") AS ?allMainSubjects) 
WHERE {
  # Define the specific conferences of interest with their Wikidata IDs
  VALUES ?conference { 
    wd:Q6053150    # ISWC 
    wd:Q17012957   # ESWC
    wd:Q64852380   # K-CAP
    wd:Q105491170  # EKAW
    wd:Q3570023    # WWW
  } 

  # Fetch labels for all entities in English
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

  # Retrieve optional properties for each conference
  OPTIONAL { ?conference wdt:P1476 ?title. }  # Title of the series
  OPTIONAL { ?conference wdt:P856 ?officialHomepage. }  # Official homepage
  OPTIONAL { ?conference wdt:P973 ?descriptionURL. }  # Described at URL (Property P973)
  OPTIONAL { ?conference wdt:P8926 ?dblpVenueID. }  # DBLP venue ID
  OPTIONAL { ?conference wdt:P921 ?mainSubject. } # main subject
} 
GROUP BY ?conference ?conferenceLabel ?title ?officialHomepage ?descriptionURL ?dblpVenueID
ORDER BY ?conferenceLabel

versus

# SPARQL Query to Retrieve Details of Key Academic Conferences Related to the Semantic Web and Knowledge Representation
# This query fetches essential information about each conference series including its title, official homepage, DBLP venue ID, 
# and a concatenated list of main subjects. The information is sourced from the Wikidata entries for each conference.

SELECT 
  ?conference 
  ?conferenceLabel 
  ?title 
  ?officialHomepage 
  ?descriptionURL 
  ?dblpVenueID 
  (GROUP_CONCAT(DISTINCT ?mainSubjectLabel; separator=", ") AS ?allMainSubjects) 
WHERE {
  # Define the specific conferences of interest with their Wikidata IDs
  VALUES ?conference { 
    wd:Q6053150    # ISWC 
    wd:Q17012957   # ESWC
    wd:Q64852380   # K-CAP
    wd:Q105491170  # EKAW
    wd:Q3570023    # WWW
  } 

  # Fetch labels for all entities in English
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

  # Retrieve optional properties for each conference
  OPTIONAL { ?conference wdt:P1476 ?title. }  # Title of the series
  OPTIONAL { ?conference wdt:P856 ?officialHomepage. }  # Official homepage
  OPTIONAL { ?conference wdt:P973 ?descriptionURL. }  # Described at URL (Property P973)
  OPTIONAL { ?conference wdt:P8926 ?dblpVenueID. }  # DBLP venue ID
  OPTIONAL {
    ?conference wdt:P921 ?mainSubject.
    ?mainSubject rdfs:label ?mainSubjectLabel.
    FILTER(LANG(?mainSubjectLabel) = "en")
  }
} 
GROUP BY ?conference ?conferenceLabel ?title ?officialHomepage ?descriptionURL ?dblpVenueID
ORDER BY ?conferenceLabel