i'm learning querying dbpedia. how query return airline companies located in asia have income greater x , used y passengers.
as learning question, show general process. first, @ airline class in dbpedia, classes in ontology namespace find @ http://dbpedia.org/ontology/airline. there no owl restrictions, need @ instance level find out properties has.
at dbpedia sparql endpoint http://dbpedia.org/sparql, use following query:
select distinct(?p) { ?s ?p ?o. ?s dbo:airline. }
now try find property each of 3 restrictions:
- in asia: @ http://dbpedia.org/property/areaserved (you need add additional step here associate areas continents)
- income: choose http://dbpedia.org/ontology/netincome, http://dbpedia.org/ontology/operatingincome , http://dbpedia.org/ontology/revenue
- passengers: there incorrect-looking http://dbpedia.org/property/passengers%3csmall%3e2012%3c/small%3e_, used 1 carrier (lufthansa). either there more used 1 in list or have find data elsewhere.
Comments
Post a Comment