select count('学历名称') from tablename

解决方案 »

  1.   

    大专、中专、本科、小学比如就是字段  学历 下的记录那就是:
    select 学历 ,count(学历) from 表名称 group by 学历
    加到query中,再用个dbgrid来显示一下就知道了。
      

  2.   

     用Querywith Query1 do
      begin 
        close;
        SQL.clear; 
        SQL.add('select * from tableName where wp=:StrWp');
        Parameters.paraByName('StrWp').value:='本科';
        open
      end;
      i:=Query1.recordcount;
      

  3.   

    select count('字段名') from table where 字段名=’大专‘
      

  4.   

    或是:select 学历 ,count(学历) as 人数 from 表名称 group by 学历//人数是显示出来字段名。
      

  5.   

    ‘select from 表名 ’语句中查询的表可以是经过过滤以后的表吗?我想对不同分厂人员进行统计分析。
      

  6.   

    同意chenjiong的
    select 学历 ,count(学历) as 人数 from 表名称 group by 学历
      

  7.   

    select count(*),学历字段 from 表名称 group by 学历字段