kdb between query - Kdb+ / qStudio

Home Forums Kdb+ / qStudio kdb between query

Tagged: ,

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #111310

    John Dempster
    Keymaster

    How to write an sql between query in kdb?
    Use the within function.
    Within returns those values within and on the bounds:

    `
    q)([] a:til 10)
    a

    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    q)t:([] a:til 10)

    q)select from t where a within 4 6
    a

    4
    5
    6

    q)select from t where a within 4 20
    a

    4
    5
    6
    7
    8
    9`

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.