Bonjour
Je débute en SQL et je ne vois pas comment faire une soustraction dans 1 requête
Je voudrais avoir un champ qui me renvoie la soustraction : Champ8 - Champ6
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 Select distinct T1.Champ1 as champ1, T1.Champ2 as champ2, T1.Champ3 as champ3, T1.Champ4 as champ4, T1.Champ5 as champ5, T1.Champ6 as champ6, T1.Champ7 as champ7, SUM(T2.Champ8) as champ8 FROM T1, T2 WHERE T1.Champ1 = T2.Champ1 GROUP BY T1.Champ1, T1.Champ2, T1.Champ3, T1.Champ4, T1.Champ5, T1.Champ6, T1.Champ7
Merci pour votre aide
Partager