Click any query title below to execute it immediately via the SPARQL Protocol. All query URLs are properly encoded and ready to use!
Retrieve a list of employees with their assigned departments, ordered alphabetically by last name. Demonstrates basic entity relationships and SPARQL property paths.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
SELECT ?employee ?firstName ?lastName ?deptName
FROM <urn:oracle:hr:kg-demo-3#>
WHERE {
?employee a hrkg:Employee ;
hrkg:first_name ?firstName ;
hrkg:last_name ?lastName ;
hrkg:has_department ?dept .
?dept hrkg:department_name ?deptName .
}
ORDER BY ?lastName
LIMIT 20
Find the top earners in the organization with their job titles. Demonstrates sorting and aggregation in SPARQL.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
SELECT ?employee ?firstName ?lastName ?salary ?jobTitle
FROM <urn:oracle:hr:kg-demo-3#>
WHERE {
?employee a hrkg:Employee ;
hrkg:first_name ?firstName ;
hrkg:last_name ?lastName ;
hrkg:salary ?salary ;
hrkg:has_job ?job .
?job hrkg:job_title ?jobTitle .
}
ORDER BY DESC(?salary)
LIMIT 10
Explore organizational structure by viewing departments with their managers and locations. Shows multi-entity relationship traversal.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
SELECT ?deptName ?managerFirst ?managerLast ?location
FROM <urn:oracle:hr:kg-demo-3#>
WHERE {
?dept a hrkg:Department ;
hrkg:department_name ?deptName ;
hrkg:has_manager ?manager ;
hrkg:has_location ?loc .
?manager hrkg:first_name ?managerFirst ;
hrkg:last_name ?managerLast .
?loc hrkg:city ?location .
}
ORDER BY ?deptName
Analyze department distribution across countries and cities. Demonstrates SPARQL aggregation with GROUP BY and COUNT.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
SELECT ?countryName ?city (COUNT(?dept) AS ?deptCount)
FROM <urn:oracle:hr:kg-demo-3#>
WHERE {
?country a hrkg:Country ;
hrkg:country_name ?countryName ;
hrkg:has_location ?loc .
?loc hrkg:city ?city .
?dept hrkg:has_location ?loc .
}
GROUP BY ?countryName ?city
ORDER BY DESC(?deptCount)
Track employee career paths through historical job assignments. Useful for understanding employee development and tenure.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
SELECT ?firstName ?lastName ?jobTitle ?startDate ?endDate
FROM <urn:oracle:hr:kg-demo-3#>
WHERE {
?history a hrkg:JobHistory ;
hrkg:has_employee ?emp ;
hrkg:has_job ?job ;
hrkg:start_date ?startDate ;
hrkg:end_date ?endDate .
?emp hrkg:first_name ?firstName ;
hrkg:last_name ?lastName .
?job hrkg:job_title ?jobTitle .
}
ORDER BY ?lastName ?startDate
Get complete RDF description of a specific employee entity. Demonstrates SPARQL DESCRIBE with slash URI pattern.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
DESCRIBE <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3/employee_id/100#this>
FROM <urn:oracle:hr:kg-demo-3#>
Explore the OWL ontology structure with classes, properties, and their definitions. Includes rdfs:isDefinedBy relations.
PREFIX hrkg: <http://demo.openlinksw.com/schemas/oracle/hr/kg-demo-3#>
SELECT *
FROM <urn:oracle:hr:kg-demo-3:ontology>
WHERE {
?s ?p ?o
}
LIMIT 100
All Queries Ready to Execute
Every query title above is a clickable SPARQL Protocol URL. Click to see immediate results in your browser!