You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deftest_execute_group_by_having_aggr(self):
tables= {
"x": [
{"a": "a1", "b": 1},
{"a": "a2", "b": 2},
{"a": "a3", "b": 3},
{"a": "a1", "b": 6},
{"a": "a2", "b": 9},
{"a": "a2", "b": 2},
],
}
schema= {
"x": {
"a": "VARCHAR",
"b": "numeric",
},
}
forsql, cols, rowsin [
('select a from x group by a having max(b) > 4', ["a"], [('a1',), ('a2',)]), # FAILED
('select a from x group by a having avg(b) < 4', ["a"], [('a1',), ('a3',)]), # FAILED
('select a from x group by a having count(*) = 2', ["a"], [('a1',)]), # FAILED
]:
withself.subTest(sql):
result=execute(sql, schema=schema, tables=tables)
self.assertEqual(result.columns, tuple(cols))
self.assertEqual(result.rows, rows)
The text was updated successfully, but these errors were encountered:
Similar with #1822
The text was updated successfully, but these errors were encountered: