I am a network engineer by trade but have gone back to school to get my CIT degree. I am currently in an oracle sql class and have been trying for hours to resolve the above error. I've pasted my code below, and included the error from my log file. Any suggestions or hints will be greatly appreciated.
SELECT tr.month AS "month"
2 , tr.base AS "base_revenue"
3 , tr.10_plus AS "10_plus"
4 , tr.20_plus AS "20_plus"
5 , tr.10_plus_less_b AS "10_plus_less_base"
6 , tr.20_plus_less_b AS "20_plus_less_base"
7 FROM
8 (SELECT CONCAT(TO_CHAR(t.transaction_date,'MON'),CONCAT('-',EXTRACT(YEAR FROM t.transaction_date)))AS month
9 , EXTRACT(MONTH FROM t.transaction_date) AS sortkey
10 , TO_CHAR(SUM (transaction_amount), '$9,999,999.00') AS base
11 , TO_CHAR(SUM (transaction_amount * 1.1), '$9,999,999.00') AS "10_plus"
12 , TO_CHAR(SUM (transaction_amount * 1.2), '$9,999,999.00') AS "20_plus"
13 , TO_CHAR(SUM (transaction_amount * .1), '$9,999,999.00') AS "10_plus_less_b"
14 , TO_CHAR(SUM (transaction_amount * .2), '$9,999,999.00') AS "20_plus_less_b")
15 FROM transaction t
16 WHERE EXTRACT(YEAR FROM t.transaction_date = 2009)
17 GROUP BY SELECT CONCAT(TO_CHAR(t.transaction_date,'MON'),CONCAT('-',EXTRACT(YEAR FROM t.transaction_date)))
18 , EXTRACT(MONTH FROM t.transaction_date) tr
19 ORDER BY tr.sortkey;
, tr.10_plus AS "10_plus"
*
ERROR at line 3:
ORA-00923: FROM keyword not found where expected
Thank you so much for any help you can give me.
Aaron