Evening, Could someone explain the result of the Query 2? Query 2 does a GROUP BY avgOctets, but still there are duplicate avgOctets in my result set! Boxplot(octets,"AVG",0) is a UDF which returns REAL values. In this case, the real values have no decimals. The only reasonable explanation I could think of is that the REAL value returned by boxplot(...) is an estimation and therefore should be casted to an INTEGER before comparison by GROUP BY is possible?
Inner Query: SELECT boxplot(octets,"AVG",0) AS avgOctets FROM joris_filter GROUP BY ipv4_src, ipv4_dst Result: avgOctets 46 46 46 46 46 46 46 40 46 46 46 144 48 48 .... Query 2: (With "inner query" as inner query): SELECT avgOctets, COUNT(*) AS frequency FROM ( SELECT boxplot(octets,"AVG",0) AS avgOctets FROM joris_filter GROUP BY ipv4_src, ipv4_dst ) avarages GROUP BY avgOctets ORDER BY avgOctets; Result: avgOctets frequency 40 350026 41 1 41 1 41 6 41 2 41 3 41 1 42 1 ... .... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]