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]
- RE: OT: SQL question Alistair Davidson
- OT: SQL Question Tony Carcieri
- RE: SQL Question Rob Rohan
- Re: OT: SQL Question Jochem van Dieten
- RE: OT: SQL Question Tony Carcieri
- CF & Currency Conversion Srimanta
- OT: SQL Question Jeff Chastain
- Re: OT: SQL Question Stephen Hait
- OT: SQL Question Cutter (CF-Talk)
- RE: SQL Question Mosh Teitelbaum
- RE: sql question Tony Weeg
- RE: sql question Tony Weeg
- Re: ot: sql question Jochem van Dieten
- RE: ot: sql question Tony Weeg
- ot: sql question Tony Weeg
- RE: sql question Paul Vernon
- RE: sql question Tony Weeg
- RE: sql question Andy Ousterhout
- ot: sql question Tony Weeg
- Re: sql question Paul Hastings
- Re: ot: sql question Qasim Rasheed