1#include "catch.hpp"
2#include "test_helpers.hpp"
3
4using namespace duckdb;
5using namespace std;
6
7TEST_CASE("Test aggregation in WHERE", "[filter]") {
8 unique_ptr<QueryResult> result;
9 DuckDB db(nullptr);
10 Connection con(db);
11 con.EnableQueryVerification();
12
13 REQUIRE_NO_FAIL(con.Query("CREATE TABLE integers(a INTEGER, b INTEGER)"));
14 REQUIRE_NO_FAIL(con.Query("INSERT INTO integers VALUES (2, 12)"));
15
16 REQUIRE_FAIL(con.Query("SELECT * FROM integers WHERE SUM(a)>10"));
17}
18