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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -