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 30 31 32 33 34 35 36 37 38 39 40 41
|
data:
LOAD DATE,
HEURE,
CLIENTS,
PRODUITS
FROM
[vente.xlsx]
(ooxml, embedded labels, table is Feuil1);
heures:
LOAD
DATE,
CLIENTS,
min(HEURE) AS HEURE_A
RESIDENT data
WHERE PRODUITS = 'A'
GROUP BY DATE, CLIENTS
;
JOIN (heures)
LOAD
DATE,
CLIENTS,
max(HEURE) AS HEURE_B
RESIDENT data
WHERE PRODUITS = 'B'
GROUP BY DATE, CLIENTS
;
liste:
LOAD
DATE AS liste.DATE,
CLIENTS AS liste.CLIENTS
RESIDENT heures
WHERE not IsNull(HEURE_A)
AND not IsNull(HEURE_A)
AND HEURE_A < HEURE_B;
DROP TABLE heures; |
Partager