mysql - Count columns where -


my problem in db table, amx_admins_servers columns admin_id, server_id, custom_flags , use_static_bantime, looks like

database link

and need count columns (server_id) have value of 4, 7, 10, 12 , print

server_id 4  - x times server_id 7  - x times server_id 10 - x times server_id 12 - x times 

the sample data shows 4 servers; if there other servers, though, should not shown.

any ideas?

select server_id, count(*) x_times amx_admins_servers server_id in (4, 7, 10, 12) group server_id 

Comments

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -