From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2854D20A65 for ; Wed, 26 Dec 2018 06:19:12 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AOg3-xbAYy2s for ; Wed, 26 Dec 2018 06:19:12 -0500 (EST) Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 7732720449 for ; Wed, 26 Dec 2018 06:19:11 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v2 1/1] sql: support HAVING without GROUP BY clause References: From: Vladislav Shpilevoy Message-ID: <94ce5d73-2934-dbbc-536e-292296c8aa5d@tarantool.org> Date: Wed, 26 Dec 2018 14:19:07 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Kirill Shcherbatov LGTM. Nikita, please, review. On 29/11/2018 17:33, Kirill Shcherbatov wrote: > Branch: http://github.com/tarantool/tarantool/tree/kshsh/gh-2364-having-without-groupby > Issue: https://github.com/tarantool/tarantool/issues/2364 > > Allowed to make SELECT requests that have HAVING clause without > GROUP BY. It is possible when both - left and right parts of > request have aggregate function or constant value. > > Closes #2364. > > @TarantoolBot document > Title: HAVING without GROUP BY clause > A query with a having clause should also have a group by clause. > If you omit group by, all the rows not excluded by the where > clause return as a single group. > Because no grouping is performed between the where and having > clauses, they cannot act independently of each other. Having > acts like where because it affects the rows in a single group > rather than groups, except the having clause can still use > aggregates. > Having without group by is not supported for select from > multiple tables. > ---