I have a SQL select statement with inner joins to get a total number of records for the statement. I have tried using count with group by's but it just counts one for each record instead of giving me the total number of records for the query. Here is the query:# select z.iIndividualId,z.vchFirstName,z.vchLastName,z.vchEmailAddress, # z.vchAddress1,z.vchCity,z.chRegionCode,dbo.cnfnFormatPostCode(z.vchPostCode) # as PostCode,dbo.cnfnFormatUSPhone(z.vchPhoneNumber) as PhoneNumber, # convert(nvarchar(10),cpd.dtDate1,101) as SessionStartDate from individual z with # (nolock) inner join customerProduct cp with (nolock) on # z.iIndividualId = cp.iOwnerId and z.tiRecordStatus = cp.tiRecordStatus # and z.iSiteId = cp.iSiteId inner join customerProductDetail cpd with (nolock) # on cp.iProductId = cpd.iProductId and cp.iSiteId = cpd.iSiteId # and cp.tiRecordStatus = cpd.tiRecordStatus where z.tiRecordStatus = 1 # and z.iSiteId = 1 and cpd.dtDate1 is not null and convert(nvarchar(10), # cpd.dtDate1,101) = '03/03/2010' order by cpd.dtDate1