Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-1656

Select statement in examples errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • 4.5
    • None
    • query

    Description

      The select statement in the examples fails even though I have all of the indexes created prior to it in the example section.

      "SELECT stops, ( DISTINCT ARRAY v.flight FOR v IN schedule end) FROM `travel-sample`
      WHERE type = "route" AND stops >= 0 GROUP BY stops; "

      Errors with the following error when I run it against the travel-sample bucket.

      [

      { "code": 4210, "msg": "Expression must be a group key or aggregate: (distinct (array (`v`.`flight`) for `v` in (`travel-sample`.`schedule`) end))", "query_from_user": "SELECT stops, ( DISTINCT ARRAY v.flight FOR v IN schedule end) FROM `travel-sample` WHERE type = \"route\" AND stops >= 0 GROUP BY stops;" }

      ]

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            amarantha.kulkarni Amarantha Kulkarni (Inactive)
            kirk Kirk Kirkconnell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty