Skip to content

v0.30.0

Choose a tag to compare

@neilotoole neilotoole released this 28 Mar 07:00
· 1515 commits to master since this release
29e33ed

Added

  • #164: Implemented unique function (docs):
    $ sq '.actor | .first_name | unique'
    This is equivalent to:
    SELECT DISTINCT first_name FROM actor
  • Implemented count_unique function (docs).
    $ sq '.actor | count_unique(.first_name)'

Changed

  • The count function has been changed (docs)
    • Added no-args version: .actor | count equivalent to SELECT COUNT(*) AS "count" FROM "actor".
    • BREAKING CHANGE: The "star" version (.actor | count(*)) is no longer supported; use the
      naked version instead.
  • Function columns are now named according to the sq token, not the SQL token.
    # previous behavior
    $ sq '.actor | max(.actor_id)'
    max("actor_id")
    200
    
    # now
    $ sq '.actor | max(.actor_id)'
    max(.actor_id)
    200