KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Count items from a dynamic list Re: Count items from a dynamic list

  • hzadonis369

    Member
    April 30, 2022 at 12:00 am
    q)lt: `a`b`a`b`c`d`c`b`a
    
    q)group lt
    a| 0 2 8
    b| 1 3 7
    c| 4 6
    d| ,5
    
    q)count each group lt
    a| 3
    b| 3
    c| 2
    d| 1

    Seems not difficult. Any other method?