RE: Group by statement

2004-08-10 Thread Lachlan Mulcahy
lto:[EMAIL PROTECTED] Sent: Wednesday, 11 August 2004 3:54 PM To: [EMAIL PROTECTED] Subject: Group by statement hi all i was tryin using mysql statement using the group by statement.. can anyone tell me is ther any difference if i do 1. GROUP BY A,B 2. GROUP BY B,A w

Group by statement

2004-08-10 Thread ankur aggarwal
hi all i was tryin using mysql statement using the group by statement.. can anyone tell me is ther any difference if i do 1. GROUP BY A,B 2. GROUP BY B,A where A and B are any 2 attributes of a table.. thanx for ur consideration ankur

Re: manipulating count group by statement

2003-12-08 Thread Mikael Fridh
Hi, I tried this and it seems to work: SELECT SUBSTRING_INDEX(INET_NTOA(ip), '.',3) AS addr, COUNT(*) AS addrsum FROM ips GROUP BY addr; Perhaps you don't have your IP adresses stored as integers but instead as text. Then the following query is for you! Your query: SELECT ip, COUNT(*) from tbl_

manipulating count group by statement

2003-12-08 Thread chad kellerman
Hello everyone, I have a mysql table tha holds a variety of ip address. I am trying to work out a select statement that will give me a count(*) grouped by the first 2 octets of the ip. if the ip table contains: 10.102.1.1 192.168.123.34 192.168.123.4 192.168.123.43 192.168.123.3 192.168.0.27