How many papers were published in 2005. Calculate the difference between the number of paper published in 2005 and the number of paper published in the previous year.
published in 2005 refer to Year = 2005; Difference refer to SUBTRACT(SUM(Year = 2005). SUM(Year = 2004))
SELECT SUM(CASE WHEN Year = 2005 THEN 1 ELSE 0 END) , SUM(CASE WHEN year = 2005 THEN 1 ELSE 0 END) - SUM(CASE WHEN year = 2004 THEN 1 ELSE 0 END) AS diff FROM Paper