1.mql 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. select count(*) as count from /test/sequence where v_int >= 1.1
  2. /**
  3. output()
  4. count(1)
  5. **/
  6. ;
  7. select id,email,username,parent,grpset,lft,rgt,otype,isactive from /matrix/ldap
  8. /**
  9. output()
  10. **/
  11. ;
  12. #/matrix/ldap | group by parent
  13. /**
  14. output()
  15. match('groupby.0',"parent")
  16. match('groups.0.__nil__.0.class',"/matrix/ldap")
  17. **/
  18. ;
  19. select count(*) from /matrix/ldap where username='admin'
  20. /**
  21. output()
  22. count(1)
  23. **/
  24. ;
  25. select parent,count() from /matrix/ldap group by parent having count()=1
  26. /**
  27. output()
  28. match('count', 1)
  29. **/
  30. ;
  31. select parent,count() from /matrix/ldap group by parent
  32. /**
  33. output()
  34. match('parent', "/")
  35. **/
  36. ;
  37. select parent,count() from /matrix/ldap group by parent having count()>1
  38. /**
  39. output()
  40. **/
  41. ;
  42. select otype,grpset,count(id) from /matrix/ldap group by otype, grpset
  43. /**
  44. output()
  45. **/
  46. ;
  47. select otype,count(id) from /matrix/ldap group by otype, grpset
  48. /**
  49. output()
  50. **/
  51. ;
  52. select grpset,count(lft) as countlftnotnull,count(*) as countall from /matrix/ldap group by otype, grpset
  53. /**
  54. output()
  55. **/
  56. ;
  57. select otype,grpset,max(lft),min(lft),sum(lft),avg(lft),count(lft) as CountNotNullLft,count(*) as CountAll from /matrix/ldap group by otype, grpset
  58. /**
  59. output()
  60. **/
  61. ;