sql query help for the table below
===

my table structure is :
table_system:
    "ID"               NUMBER NOT NULL ENABLE,
    "COUNTRY"          VARCHAR2(10 BYTE) NOT NULL ENABLE,
    "COMPANYCODE"      VARCHAR2(50 BYTE) NOT NULL ENABLE,
    "SYSTEM"           VARCHAR2(50 BYTE) NOT NULL ENABLE,
    "NOTSTARTED"       NUMBER,
    "RUNNING"          NUMBER,
    "COMPLETED"        NUMBER,
    "ACTUALSTARTTIME"  VARCHAR2(5 BYTE),
    "ACTUALENDTIME"    VARCHAR2(5 BYTE),
    "SEQUENCE"         NUMBER,
    "PLANNEDSTARTTIME" VARCHAR2(5 BYTE),
    "PLANNEDENDTIME"   VARCHAR2(5 BYTE),
    "ESTIMATEDENDTIME" VARCHAR2(5 BYTE),
    CONSTRAINT "SYSTEMRUNTIME_PK" PRIMARY KEY ("ID", "COUNTRY", "COMPANYCODE", "SYSTEM") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE

I need an output that will fetch me the following output:


COMPANYCODE                                        	SYSTEM1	SYSTEM2	SYSTEM3	SYSTEM4	SYSTEM5	SYSTEM6	SYSTEM7	SYSTEM8	…	SYSTEM N
-------------------------------------------------- 	---------------------------	-------------------	-----------------------	------------------------------	------------------------------	--------------------	--------------	--------------	--------------	--------------

where systems are sorted as per the "SEQUENCE" attribute.

I have tried this query :
        "select distinct companycode, sequence, system,notstarted,running,completed
        from table_system
        where id = (select max(id) from table_system)
        order by companycode, sequence"

this fetches me the following 

COMPANYCODE	SEQUENCE	SYSTEM	NOTSTARTED	RUNNING	COMPLETED
--------------------------------------------------	----------------------	--------------------------------------------------	----------------------	----------------------	----------------------
1001 Helsinki Branch	1	GAP 2 / Datastage GL	0	0	3
1001 Helsinki Branch	2	SAP GL	0	0	2
1001 Helsinki Branch	3	SAP BW	0	0	2
1002 Copenhagen Branch	1	GAP 2 / Datastage GL	0	0	3
1002 Copenhagen Branch	2	SAP GL	0	0	2
1002 Copenhagen Branch	3	SAP BW	0	0	2
1003 Oslo Branch	1	GAP 2 / Datastage GL	0	0	3
1003 Oslo Branch	2	SAP GL	0	0	2
1003 Oslo Branch	3	SAP BW	0	0	2
1004 (publ) (EUR)	1	EKO	0	0	13
1004 (publ) (EUR)	2	HA Core	0	0	6
1004 (publ) (EUR)	3	HA Post Processor	0	0	5
1004 (publ) (EUR)	4	Datastage GL	3	0	10
1004 (publ) (EUR)	5	Datastage Recon	1	0	3
1004 (publ) (EUR)	11	SAP GL	0	0	4
1004 (publ) (EUR)	21	SAP BW	0	0	4

but I want the output to be :


COMPANYCODE                                        	SYSTEM1	SYSTEM2	SYSTEM3	SYSTEM4	SYSTEM5	SYSTEM6	SYSTEM7	SYSTEM8	…	SYSTEM N
-------------------------------------------------- 	---------------------------	-------------------	-----------------------	------------------------------	------------------------------	--------------------	--------------	--------------	--------------	--------------
1001 Helsinki Branch        	GAP 2 / Datastage GL	SAP GL	SAP BW							
1002 Copenhagen Branch      	GAP 2 / Datastage GL	SAP GL	SAP BW							
1003 Oslo Branch            	GAP 2 / Datastage GL	SAP GL	SAP BW							
1004 (publ) (EUR)                   	EKO	HA Core	HA Post Processor	Datastage GL	Datastage Recon	SAP GL	SAP BW			

Any hint for the above will be highly appreciated.
Thank You
vinayak