To be able to get each month as a column data, use something like this:
SELECT *, [Mar] + [Apr] + ... [Feb] AS Total
FROM (
SELECT t.upload_year, SUM(CASE WHEN t.upload_month ='Mar' AND t.upload_year = '2007' THEN t.net_due ELSE NULL END) AS [Mar],
SUM(CASE WHEN t.upload_month ='Apr' AND t.upload_year = '2007' THEN t.net_due ELSE NULL END) AS [Apr],
SUM(CASE WHEN t.upload_month ='May' AND t.upload_year = '2007' THEN t.net_due ELSE NULL END) AS [May],
...
SUM(CASE WHEN t.upload_month ='Jan' AND t.upload_year = '2008' THEN t.net_due ELSE NULL END) AS [Jan],
SUM(CASE WHEN t.upload_month ='Feb' AND t.upload_year = '2008' THEN t.net_due ELSE NULL END) AS [Feb]
FROM ...
WHERE t.upload_year IN ('2007','2008')
GROUP BY t.upload_year
) AS FinancialYearData
Above example shows how to get sum of
net_due
for each month.
I'd suggest to read this:
PIVOT and UNPIVOT Operators in Oracle Database 11g Release 1[
^]
Note: i have no idea why do you store numeric data as a string (
upload_year
)!