select count(), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(*), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(id), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; -- 不支持这种写法 distinct 后面必须带字段名 select count(distinct), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** onerror(continue,"not exist") noerrinfo() **/ ; select count(distinct *), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(distinct id), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(distinct v_chars), v_chars as "文字" from /test/foo group by v_chars order by "文字" desc /** output() match('文字','d',count,1) match('文字','c',count,1) match('文字','b',count,1) match('文字','a',count,1) **/ ; select count(distinct xx.v_chars), xx.v_chars as "文字" from /test/foo xx group by xx.v_chars order by "文字" desc /** output() match('文字','d',count,1) match('文字','c',count,1) match('文字','b',count,1) match('文字','a',count,1) **/ ; select count(), v_chars as "文字" from (select * from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(*), v_chars as "文字" from (select * from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(id), v_chars as "文字" from (select * from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(distinct), v_chars as "文字" from (select v_chars, id as distinct from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(distinct *), v_chars as "文字" from (select * from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(distinct id), v_chars as "文字" from (select * from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,4) match('文字','c',count,3) match('文字','b',count,2) match('文字','a',count,1) **/ ; select count(distinct v_chars), v_chars as "文字" from (select * from /test/foo) xx group by v_chars order by "文字" desc /** output() match('文字','d',count,1) match('文字','c',count,1) match('文字','b',count,1) match('文字','a',count,1) **/ ; select count(distinct xx.v_chars), xx.v_chars as "文字" from (select * from /test/foo) xx group by xx.v_chars order by "文字" desc /** output() match('文字','d',count,1) match('文字','c',count,1) match('文字','b',count,1) match('文字','a',count,1) **/ ;