Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distinct clients in zones
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Distinct clients in zones
Divers
Thread ID:
00160528
Message ID:
00160528
Vues:
49
I'm having trouble figuring how to put this problem into SQL. Any help would be appreciated.

I've got a table with clientkey, pzone, dzone. I want to end up with a table that has zone, pnumclients, dnumclients.

"zone" is a combination of all zones in pzone and dzone. "pnumclients" is the number of clients that are listed with that pzone and likewise for dnumclients.

So if I had:

ck pz dz
1 22 23
1 22 23
1 23 22
2 22 23

I'd get:

z pc dc
22 2 1
23 1 2


Any ideas?

Thanks,

-Michelle
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform