sql - please help me in solving this count query -


i wanted find count of mobile nos table below query

select name, count(mobile no) count table count<=5 

this query throws me error...please me out

on sql server, if have object names contains spaces or other special characters, need put names in square brackets.

furthermore, if want apply filter aggregate function, should happen in having part of statement, instead of in where part. means need group name column.

try change query this:

select name, count([mobile no]) count  table  group name  having count([mobile no])<=5 

Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -