]> gitweb.pimeys.fr Git - scripts-20-100.git/blobdiff - bde/integrite/memo
[bde] Rangement
[scripts-20-100.git] / bde / integrite / memo
diff --git a/bde/integrite/memo b/bde/integrite/memo
deleted file mode 100644 (file)
index f7519c1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# pour créer la table numcbde,gagne,perdu,effectif :
-
-SELECT numcbde,(SELECT sum(montant*quantite) FROM transactions WHERE destinataire=main.numcbde AND valide='t') as gagne,(SELECT sum(montant*quantite) FROM transactions WHERE emetteur=main.numcbde AND valide='t') as perdu, (SELECT solde FROM adherents WHERE numcbde=main.numcbde) as effectif FROM adherents as main;
-
-# et créer la table + en extraire seulement les gens intéressants :
-# NB : c'est long à exécuter...
-SELECT numcbde,gagne-perdu,effectif FROM (SELECT numcbde,(SELECT sum(montant*quantite) FROM transactions WHERE destinataire=main.numcbde AND valide='t') as gagne,(SELECT sum(montant*quantite) FROM transactions WHERE emetteur=main.numcbde AND valide='t') as perdu, (SELECT solde FROM adherents WHERE numcbde=main.numcbde) as effectif FROM adherents as main) AS calculs WHERE gagne-perdu!=effectif;