1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| with a as (
select
num_client
,num_operation
,cod_operation
,montant
from mouvement mvt
where cod_operation in ('*VA' ,'VB','VC' ,'VD')
)
select
a.num_compte
,(select num_operation from a where a.cod_operation in ('VA' ) )num_opération_VA
,(select MONTANT from a where a.cod_operation in ('VA' ) )MONTANT_VA
,(select num_operation from a where a.cod_operation in ('VB' ) )num_opération_VB
,(select MONTANT from a where a.cod_operation in ('VB' ) )MONTANT_VB
,(select num_operation from a where a.cod_operation in ('VC' ) )num_opération_VC
,(select MONTANT from a where a.cod_operation in ('VC' ) )MONTANT_VC
,(select num_operation from a where a.cod_operation in ('VD' ) )num_opération_VD
,(select MONTANT from a where a.cod_operation in ('VD' ) )MONTANT_VD
from a |