Hi I would like to know how to create a MySQL statement with Count(*) and natural join. I have a table named iphead and another table named even. iphead has a number of IP addresses and I would like to count the total number using count(*). Next, the even table has the corresponding signatures which I would like to join to the counted IP addresses using even.sid=iphead.sid. Can anyone help me?
|+0 forum 2|
Hi, I have a thousands of IP addresses, repeating randomly in my database and I wish to print each IP address along with the number of times they are repeated. For example, 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 Output: 184.108.40.206 - 3 220.127.116.11 - 3 18.104.22.168 - 1 I have used Counter() to do this manually by listing them individually and then using Counter(list). As there are thousands of IP addresses, it is impossible to list them out manually in the program. Is there any way where I can get the output with a for loop or anything else?
|+0 forum 6|