51orderby.mql 568 B

12345678910111213141516171819202122232425262728293031
  1. select id,v_chars as "文字" from /test/foo order by "文字"
  2. /**
  3. output()
  4. **/
  5. ;
  6. select count(*), aa.v_chars as "文字" from /test/foo aa
  7. group by aa.v_chars order by "文字" desc
  8. /**
  9. output()
  10. match('文字','d',count,4)
  11. match('文字','c',count,3)
  12. match('文字','b',count,2)
  13. match('文字','a',count,1)
  14. **/
  15. ;
  16. select count(*), aa.v_chars as "文字" from
  17. (select * from /test/foo) aa
  18. group by aa.v_chars order by "文字" desc
  19. /**
  20. output()
  21. match('文字','d',count,4)
  22. match('文字','c',count,3)
  23. match('文字','b',count,2)
  24. match('文字','a',count,1)
  25. **/
  26. ;