I'm just learning querying DBpedia. How would look query to return all Airline companies located in Asia that have income greater than X and are used by Y passengers.
Asked
Active
Viewed 97 times
1 Answers
0
As this is a learning question, I will show you the general process. First, we look at the Airline class in DBpedia, classes are in the ontology namespace so we find it at http://dbpedia.org/ontology/Airline. There are no owl restrictions, so we need to look at the instance level to find out what properties it has.
At the DBpedia SPARQL endpoint http://dbpedia.org/sparql, use the following query:
select distinct(?p)
{
?s ?p ?o.
?s a dbo:Airline.
}
Now we try to find a property for each of your three restrictions:
- in Asia: look at http://dbpedia.org/property/areaServed (you probably need to add an additional step here to associate areas with continents)
- income: choose from http://dbpedia.org/ontology/netIncome, http://dbpedia.org/ontology/operatingIncome and http://dbpedia.org/ontology/revenue
- passengers: there is only the incorrect-looking http://dbpedia.org/property/passengers%3Csmall%3E2012%3C/small%3E_, which is only used by one carrier (Lufthansa). Either there is a more often used one in the list or you have to find this data elsewhere.

Konrad Höffner
- 11,100
- 16
- 60
- 118