Query DBpedia like never before
with timbr-DBpedia SQL Knowledge Graph
Query DBpedia in
Select a Topic to see Sample Queries
General Purpose Queries
SQL Query:
SELECT format_number(count(1), 0) AS `Number of People`,
entity_type AS `Belong to Category (Concepts)`
FROM `timbr`.`person`
GROUP BY entity_type
ORDER BY count(1) DESC
Results:

SQL Query:
SELECT entity_id AS `DBpedia global id`,
entity_type AS `Category`,
entity_label AS `Label`
FROM `etimbr`.`thing`
WHERE `date` = ‘2000-01-01’
Results:

SQL Query:
SELECT entity_label AS `company_name`,
`country.entity_label` AS `company_country`,
`ceo.entity_label` AS `ceo_name`,
`ceo.birthPlace.entity_label` AS `birthplace`,
`ceo.birthPlace.country.entity_label` AS `ceo_birth_country`
FROM `dtimbr`.`company`
WHERE `ceo.entity_label` IS NOT NULL
AND `country.entity_label` = ‘United States of America’
AND `ceo.birthPlace.country.entity_label` != ‘United States of America’
LIMIT 50
Results:

Marketing Industry Queries
SQL Query:
SELECT entity_label AS `Label`,
entity_type AS `Category`,
slogan AS `Slogan`
FROM `etimbr`.`thing`
WHERE slogan LIKE ‘%Best%’
Results:

SQL Query:
SELECT entity_id AS `Datasource Link`,
entity_label AS `Title`,
entity_type AS `Category`,
releasedate AS `Release Date`,
imdbid AS `IMDB-ID`,
isbn AS `ISBN`
FROM `etimbr`.`work`
WHERE entity_label LIKE ‘%Batman%’
Results:

SQL Query:
SELECT lower(word) AS `word`,
count(1) AS `num`
FROM (
SELECT explode(split(motto, ‘ ‘)) AS `word`
FROM `timbr`.`organisation`
WHERE motto IS NOT NULL
)
WHERE `length`(word) > 4
GROUP BY lower(word)
ORDER BY num DESC
LIMIT 50
Results:

Business Related Queries
SQL Query:
SELECT entity_label AS `Bank`,
`owner.entity_label` AS `Owner`,
`country.entity_label` AS `Country`,
`country.continent.entity_label` AS `Continent`
FROM `dtimbr`.`bank`
WHERE `country.continent.entity_label` = ‘Europe’
AND `owner.entity_label` IS NOT NULL
Results:

SQL Query:
SELECT entity_label AS `Company Name`,
format_number(operatingincome, 0) AS `Operating Income`,
format_number(numberofemployees, 0) AS `Number of Employees`,
format_number(operatingincome/numberofemployees, 0) AS `Operating Income per Employee`,
`country.entity_label` AS `Country`,
`country.continent.entity_label` AS `Continent`
FROM `dtimbr`.`company`
WHERE operatingincome > 150000000
AND `country.continent.entity_label` IN (‘Europe’, ‘Asia’)
ORDER BY operatingincome DESC
Results

SQL Query:
SELECT entity_label AS `Company Name`,
`owningcompany.entity_label` AS `Parent Company`,
`owningcompany.owner.entity_label` AS `Owner of Parent Company`,
entity_type AS `Company Category`,
`country.entity_label` AS `Company Country`
FROM `dtimbr`.`organisation`
WHERE `owningcompany.owner.entity_label` LIKE ‘%Warner%’
Results:

Healthcare and Research Related Queries
SQL Query:
SELECT max(`country.entity_label`) AS `country`,
COUNT(entity_id) AS `total_hospitals`
FROM `dtimbr`.`hospital`
WHERE `country.entity_id` IS NOT NULL
GROUP BY `country.entity_id`
ORDER BY COUNT(entity_id) DESC
Results:

SQL Query:
SELECT`entity_label` AS `Disease`,
`complications` AS `Complications`
FROM `dtimbr`.`disease`
WHERE entity_label IS NOT NULL
AND complications LIKE ‘%heart%’
Results:


SQL Query:
SELECT `entity_label` AS `Compound`,
`meltingpoint` AS `Melting_Point`,
`weight` AS `Weight`,
`formula` AS `Formula`,
`solubility` AS `Solubility`,
`solventwithgoodsolubility.entity_label` AS `Good_Solvent`
FROM `dtimbr`.`chemicalcompound`
WHERE `solventwithgoodsolubility.entity_label` IS NOT NULL
AND solubility IS NOT NULL
AND solubility < 1000 AND meltingpoint > 200
ORDER BY solubility
Results:

Education Related Queries
SQL Query:
SELECT entity_label AS `University`,
`facultysize` AS `Faculty Size`,
`numberofstudents` AS `Number of Students`,
`numberofundergraduatestudents` AS `Number of Undergraduate Students`
FROM `timbr`.`university`
ORDER BY facultysize DESC
Results:

SQL Query:
SELECT entity_id AS `Event_Link`,
entity_label AS `DBpedia global id`,
`country.entity_label` AS `Country`,
`date` AS `Battle Date`
FROM `dtimbr`.`militaryconflict`
WHERE `country.entity_label` = ‘United Kingdom’
AND `date` IS NOT NULL
ORDER BY `date`
LIMIT 100
Results:


SQL Query:
SELECT entity_label AS `Journal`,
`impactfactor` AS `Impact_Factor`,
`impactfactorasof` AS `Impact_Factor_Year`,
`publisher.entity_label` AS `Publisher`
FROM `dtimbr`.`academicjournal`
WHERE `publisher.entity_label` IS NOT NULL
AND `impactfactor` IS NOT NULL
AND `impactfactorasof` IS NOT NULL
ORDER BY `impactfactor` DESC
Results:

Entertainment Industry Queries
SQL Query:
SELECT `artist.entity_label` AS `Artist_Name`,
COUNT(entity_label) AS `Total_Songs`
FROM `dtimbr`.`song`
WHERE `entity_label` IS NOT NULL
AND `artist.entity_label` IS NOT NULL
GROUP BY `Artist_Name`
ORDER BY `Total_Songs` DESC
Results:

SQL Query:
SELECT `entity_id` AS `DBpedia global id`,
`entity_label` AS `Full_Name`,
`birthdate`
FROM `timbr`.`person`
WHERE `entity_type` LIKE ‘%soccermanager%’
AND `entity_type` LIKE ‘%soccerplayer%’
ORDER BY `birthdate`
Results:


SQL Query:
SELECT `director.entity_label` AS `Director Name`,
count(1) AS `num`,
collect_list(entity_label) AS `movies`
FROM `dtimbr`.`film`
WHERE `starring.actor.entity_label` = ‘Adam Sandler’
AND `director` IS NOT NULL
GROUP BY `director.entity_label`
ORDER BY `num` DESC
LIMIT 1
Results:
