1 2 3 4 5 6 7 8 9 10 11 12 13 14
| with AR_article(AR_id, AR_ref, AR_qte, AR_date_inv) as
(select 1, 'ARTICLE 1', 250, '2021-01-02' union all
select 2, 'ARTICLE 2', 0, '2021-01-02' union all
select 3, 'ARTICLE 3', 300, '2021-02-01' union all
select 4, 'ARTICLE 4', 200, '2021-01-01'
)
, MV_mouvement(AR_id, MV_date, MV_type, MV_qte) as
(select 1, '2021-01-10', 'E', 1000 union all
select 2, '2021-01-10', 'E', 5000 union all
select 1, '2021-01-12', 'S', 0500 union all
select 3, '2021-01-15', 'S', 0100 union all
select 2, '2021-01-26', 'S', 0120 union all
select 3, '2021-02-03', 'E', 0500
) |