SQL query counts the number of occurrences of the same field - easy data analysis and statistics

SQL queries the order in which the IP field in the enewsmemberadd table is equal to 61.9.111.212, and counts the numbers greater than 1.

select count(lastip),lastip from enewsmemberadd where lastip = '61.9.111.212' group by lastip having count(lastip)>1

The lastip in it is replaced with the field you need to statistically query

enewsmemberadd for your table name

lastip = '61.9.111.212' is an additional query field, you can delete where lastip = '61.9.111.212'

Guess you like

Origin blog.csdn.net/winkexin/article/details/131351830