1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| WITH vente AS (
SELECT 1 idVente, 1 idProduit, 10 MntVente, to_date('01/01/2012', 'dd/mm/yyyy') DateVente FROM dual union ALL
SELECT 2 idVente, 2 idProduit, 20 MntVente, to_date('02/01/2012', 'dd/mm/yyyy') DateVente FROM dual union ALL
SELECT 3 idVente, 3 idProduit, 30 MntVente, to_date('03/01/2012', 'dd/mm/yyyy') DateVente FROM dual union ALL
SELECT 4 idVente, 4 idProduit, 40 MntVente, to_date('04/01/2012', 'dd/mm/yyyy') DateVente FROM dual union ALL
SELECT 5 idVente, 5 idProduit, 50 MntVente, to_date('05/01/2012', 'dd/mm/yyyy') DateVente FROM dual union ALL
SELECT 6 idVente, 6 idProduit, 60 MntVente, to_date('05/01/2012', 'dd/mm/yyyy') DateVente FROM dual union ALL
SELECT 7 idVente, 7 idProduit, 70 MntVente, to_date('08/01/2012', 'dd/mm/yyyy') DateVente FROM dual
),
transfert AS (
SELECT 1 idTransfert, 0 MntTransfert, to_date('31/12/2011', 'dd/mm/yyyy') DateTransfert FROM dual union ALL
SELECT 2 idTransfert, 30 MntTransfert, to_date('02/01/2012', 'dd/mm/yyyy') DateTransfert FROM dual union ALL
SELECT 3 idTransfert, 120 MntTransfert, to_date('06/01/2012', 'dd/mm/yyyy') DateTransfert FROM dual union ALL
SELECT 4 idTransfert, 130 MntTransfert, to_date('07/01/2012', 'dd/mm/yyyy') DateTransfert FROM dual union ALL
SELECT 5 idTransfert, 140 MntTransfert, to_date('09/01/2012', 'dd/mm/yyyy') DateTransfert FROM dual
) |
Partager