how would I use HAVING to select out where the difference between
reportsInDatabase and DistinctTimes is above 15%
im stuck and its just not clicking this morning....thanks if you can figure
this out....

select r.IpAddressNumber, v.VehicleIp,
Count(r.ReportId) as ReportsInDatabase,
Count(DISTINCT Time) as DistinctTimes, v.VehicleName, c.companyName
from reportsView r
INNER JOIN
vehicletable v
on v.IpAddressNumber = r.IpAddressNum
INNER JOIN
companyTable c
on v.companyIdNumber = c.companyIdNumber
where r.currentDate between '09-29-2003 00:00:00.000'  and '09-29-2003
23:59:59.999'
Group By v.IpAddressNumber, r.IpAddressNum, v.VehicleName,
v.VehicleIp, c.companyName
Order by ReportsInDatabase DESC

im stuck

...tony

tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to