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?

Recommended Answers

Kindly post the tables structures also post the query that you are working on.

Jump to Post

All 2 Replies

Kindly post the tables structures also post the query that you are working on.

It will be something like (I'm assuming your table structure)

SELECT even.signature, COUNT(*) FROM even 
INNER JOIN even.sid=iphead.sid
GROUP BY even.sid
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.