经典指数          
原因
2679
浏览数
0
收藏数
 

在SQL中,一个表的定义如下: CREATE TABLE t_account( account varchar(100), account_type TINYTEXT, PRIMARY KEY (account), }; account为账号,account_type为该账号的类型,写出一个sql,统计账号数累计超过5000个账号类型,并显示对应的账号数,即结果中每行是(账号类型,账号数)

     举报   纠错  
 
切换
1 个答案

select account_type as 账号类型,count(account) as 账号数 from t_account group

by account_type having count(account)>5000

 
切换
撰写答案