title: DBpedia SPARQL Query US Universities
body: <p>I created a SPARQL query that I'm running on the <a href="http://dbpedia.org/snorql/" rel="nofollow">DBpedia SNORQL SPARQL endpoint</a>. The purpose of the query is to get a list of universities or colleges in the United States, including their longitude, latitude, and endowment. The query seems to be working but seems to be missing some records and/or attributes. So, for example, Harvard University doesn't show up in the result, even though its <a href="http://dbpedia.org/page/Harvard_University" rel="nofollow">DBpedia record</a> exists and the attributes should match my query. I'm not sure why that record doesn't show up. Another example is <a href="http://dbpedia.org/page/University_of_Massachusetts_Boston" rel="nofollow">University of Massachusetts Boston</a>, which comes up as a query result, but the result doesn't get the longitude and latitude attributes, even though the record contains those attributes.  Here's the SPARQL Query:</p>
  
  <pre><code>PREFIX geo: &lt;http://www.w3.org/2003/01/geo/wgs84_pos#&gt;
  PREFIX d: &lt;http://dbpedia.org/ontology/&gt;
  
  SELECT ?uni ?link ?lat ?long ?endowment
  WHERE {
  ?s foaf:homepage ?link ;
     rdf:type &lt;http://schema.org/CollegeOrUniversity&gt; ;
  rdfs:label ?uni
  OPTIONAL {?s geo:lat ?lat ;
               geo:long ?long . 
            ?s d:endowment ?endowment . }
  FILTER (LANGMATCHES(LANG(?uni), 'en'))
  
  {?s dbpedia2:country "U.S."@en . }
  UNION
  {?s dbpedia2:country "U.S." . }
  UNION
  {?s d:country :United_States . }
  
  }
  ORDER BY ?s
  </code></pre>