Still doesn't work, I've even tried:

HAVING  
        ( Avg_Xmit = 12345 ) AND ( Samples >= 25 )

19000 rows returned, none equalling 12345, but all have Samples >= 25.
It's almost as if this became an OR.


Cliff

Gerald Clark <[EMAIL PROTECTED]> writes:
> Have you tried:
> HAVING
>   ( Avg_Xmit < 28800 )
>   AND ( Samples >= 10 )
> 
> ?
> 
> Cliff Daniel wrote:
> 
> > I'm having some difficulting on 3.23.38, linux x86...  When I write
> > the following query the HAVING clause is only listening to the 'AND
> > Samples >= 10' and displas all Avg_Xmit regardless if it's less than
> > or equal to 28800.
> > 
> > If I remove the 'AND Samples >= 10' I get the correct results, but of
> > course samples are permitted if less than 10, which I do not want.
> > 
> > Any ideas?
> > 
> > SELECT  
> >         INET_NTOA(NAS_Identifier),
> >         NAS_DS1,
> >         AVG(Ascend_Xmit_Rate) as Avg_Xmit,
> >         AVG(Ascend_Data_Rate) as Avg_Recv,
> >         AVG(Acct_Session_Time) / 60 as ACHT,
> >         COUNT(*) as Samples
> > 
> > FROM
> >         tbl_data_call_detail
> > 
> > WHERE   
> >         Acct_Session_Time > 0
> > 
> > GROUP BY
> >         NAS_Identifier,
> >         NAS_DS1
> > 
> > HAVING  
> >         Avg_Xmit < 28800
> >     AND Samples >= 10
> > 
> > ORDER BY
> >         Avg_Xmit DESC
> > 
> > 
> > Regards,
> > Cliff
> > 
> > 
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> > 
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> -- 
> Gerald L. Clark
> [EMAIL PROTECTED]

-- 
Cliff Daniel
Level 3 Communications

"The government deficit is the difference between the amount of money the 
government spends and the amount it has the nerve to collect."  --Sam Ewing


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to