User:Woodjr/Sandbox/Sparql4

From Open Energy Information

Jan 2005 Electric Utilities Generation, by State

{{#sparql:

 PREFIX prop: <http://en.openei.org/lod/resource/datasets/43/terms/>
 PREFIX item: <http://en.openei.org/lod/resource/datasets/43/>
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 SELECT $state ?year ?month ?generation
 FROM <http://en.openei.org/lod/graph/datasets/43>
 WHERE {
   ?result prop:year "2005"^^xsd:integer .
   ?result prop:month "1"^^xsd:integer .
   ?result prop:state ?state .
   ?result prop:year ?year .
   ?result prop:month ?month .
   ?result prop:type_of_producer "Electric Generators, Electric Utilities" .
   ?result prop:energy_source "Total" .
   ?result prop:generation ?generation .
 }
 ORDER BY ?state $year $month

|endpoint=http://en.openei.org/sparql |format=table }}