Consider the following situation, 
We have Apple that contains info of Apples Sold, Color gives Apple Color, Date gives the date it was sold.
I want to get Apple color, the sum of Apples sold after 2010, and the sum of apples sold after 2016 in the same row.
This is my code,
SELECT distinct Color, (CASE WHEN WHN >= to_date('01/01/2010','mm/dd/yyyy')
THEN SUM(Apple) over (partition by Color) end) as tot_2010,
(CASE WHEN WHN >= to_date('01/01/2016','mm/dd/yyyy')
THEN SUM(Apple) over (partition by Color) end) as tot_2016
from temp;
Now, this is the output I get
Here is the desired Output
Here is the SQL Fiddle

