Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order by date, group by cusomerid
Message
De
23/06/2003 07:25:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/06/2003 07:12:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00802828
Message ID:
00802830
Vues:
15
>Who can help me?
>I have a table 'custdetails' with the following fields: Shipdate,customerid.
>I want to fill grid with how many NEW customer I had every day.
>I rununing the following syntax:
select * from custdetails order by shipdate into cursor tmp1 nofilter
>select * from tmp1 group by customerid into cursor tmp2 nofilter
>Select shipdate,count(customerid) from tmp2
>My problem is that I get the late shipdate not the first (if person has shipdate for today and for yesterday he will be counted as yesterday).
>What can I do?
>Thank you for help
>Chaim

Do you mean you want to count customers who have a Shipdate = Today ?

select count(distinct customerid) from custdetails where ShipDate = date()

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform