kdb remove duplicate rows - Kdb+ / qStudio

Home Forums Kdb+ / qStudio kdb remove duplicate rows

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #111070

    Michael
    Guest

    How can I remove duplicate rows from a table in kdb?

    #111072

    Ryan Hamilton
    Keymaster

    distinct will return only those rows that are unique in a table. For example:

    `q)t:([] a:1 1 1 2 2 2; b:4 4 5 5 6 6)`

    q)t
    a b

    1 4
    1 4
    1 5
    2 5
    2 6
    2 6

    q)distinct t
    a b

    1 4
    1 5
    2 5
    2 6

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.