Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing the days with the same date 2

Status
Not open for further replies.

Dophia

Technical User
Jul 26, 2004
263
0
16
CA
Hello Everyone: I have a query which includes the date. I want to total the number of records with the same date

Jan 1 2014 xx
Jan 1 2014 xt
Jan 10 2014 xu
Jan 15 2014 st

I want to show
Jan 1 2014 2
Jan 10 2014 1
Jan 15 2014 1

Can anyone suggest how I can do this?

Thank you, Sophia
 
Hi,

Code:
Select [your date], count(*)
From [your table]
Group by [your date]
 
Thank you for your help. How would I put that in a query?
Sophia
 
Hi Again: That seems to give me a "1" for every date and not like I wanted. Here is my query. Any further suggestions would be appreciated.


SELECT tblAnimal_ReleaseOther.Pound_Sheet_No, tblAnimal_ReleaseOther.Date_Released, Count(tblAnimal_ReleaseOther.Date_Released) AS Expr1
FROM tblAnimal_ReleaseOther
GROUP BY tblAnimal_ReleaseOther.Pound_Sheet_No, tblAnimal_ReleaseOther.Date_Released;


Sophia
 
You need to get rid of the Pound_Sheet_no from the query.

SQL:
SELECT tblAnimal_ReleaseOther.Date_Released, Count(tblAnimal_ReleaseOther.Date_Released) AS DateCount
 FROM tblAnimal_ReleaseOther
 GROUP BY tblAnimal_ReleaseOther.Date_Released;

Duane
Hook'D on Access
MS Access MVP
 
Code:
SELECT 
  Date_Released
, Count(Date_Released) AS Expr1

FROM tblAnimal_ReleaseOther

GROUP BY Date_Released;
 
Thank you both very much! It works :)
Sophia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top