Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order by date, group by cusomerid
Message
From
23/06/2003 07:25:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/06/2003 07:12:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00802828
Message ID:
00802830
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform