Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible in one Select Statement?
Message
 
À
03/02/2002 11:27:32
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00614551
Message ID:
00614573
Vues:
17
Hi, is this what you want to calculate

Select supplier, count(days) as all_records,;
sum(Iif(days<=2,1,0)) as count_1_2,;
sum(Iif(days<=2,1,0))/count(days) as perc_1_2,;
sum(Iif(Between(days, 3, 6),1,0)) as count_3_6,;
sum(Iif(Between(days, 3, 6),1,0))/count(days) as perc_3_6,;
sum(Iif(days>=7,1,0)) as count_7_more,;
sum(Iif(days>=7,1,0))/count(days) as perc_7_more;
from test group by supplier

my table is called test, so put there your real table name
Venelina Jordanova

Outsourcing IT Services Ltd.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform