In [1]:
%load_ext sql
In [10]:
%sql sqlite:///2016.db
Out[10]:
In [17]:
%sql select count(distinct orispl_code) as num_plants, fuel_type, SUM(heat_input), SUM(CO2_MASS) from data group by fuel_type
Out[17]:
In [16]:
%sql select count(distinct orispl_code) as num_plants, fuel_type, SUM(heat_input), SUM(CO2_MASS) from data group by fuel_type, state
Out[16]:
In [ ]: