1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| SELECT
a.Id,
a.critereA,
a.critereB,
b.date as date1,
b.montant as montant1,
c.date as date2,
d.montant as montant2
FROM
MaTable a,
(SELECT Id, critereA, critereB, date, montant
FROM MaTable
WHERE date = @prompt('Date 1','D',,,)) b,
(SELECT Id, critereA, critereB, date, montant
FROM MaTable
WHERE date = @prompt('Date 2','D',,,)) c
WHERE
a.date IN (@prompt('Date 1','D',,,),@prompt('Date 2','D',,,))
AND (a.Id = b.Id(+) AND a.critereA.Id = b.critereA (+) AND a.critereB = b.critereB (+))
AND (a.Id = c.Id(+) AND a.critereA.Id = c.critereA (+) AND a.critereB = c.critereB (+)) |
Partager