neuron
09-15-2005, 05:11 PM
Suppose I have the following table:
Name Date
----- ------------
Adam 10 Sep 2005
Adam 10 Sep 2005
Adam 10 Sep 2005
Betty 10 Sep 2005
Betty 10 Sep 2005
Adam 11 Sep 2005
Betty 12 Sep 2005
Betty 12 Sep 2005
And I want to count the number of occurrences of each name on each day.
For example, Adam has 3 occurrences for 10 Sep 2005, Betty has 2 occurrences for the same date. Adam has 1 occurrence for 11 Sep 2005, Betty has 2 occurrences for 12 Sep 2005.
How can I write this kind of query?
Thanks a lot!
Name Date
----- ------------
Adam 10 Sep 2005
Adam 10 Sep 2005
Adam 10 Sep 2005
Betty 10 Sep 2005
Betty 10 Sep 2005
Adam 11 Sep 2005
Betty 12 Sep 2005
Betty 12 Sep 2005
And I want to count the number of occurrences of each name on each day.
For example, Adam has 3 occurrences for 10 Sep 2005, Betty has 2 occurrences for the same date. Adam has 1 occurrence for 11 Sep 2005, Betty has 2 occurrences for 12 Sep 2005.
How can I write this kind of query?
Thanks a lot!