exec-ddl
CREATE TABLE a (k INT PRIMARY KEY, i INT, s STRING, d DECIMAL NOT NULL)
----
TABLE a
 ├── k int not null
 ├── i int
 ├── s string
 ├── d decimal not null
 └── INDEX primary
      └── k int not null

opt
SELECT max(k), min(k), i, s FROM a GROUP BY i, s
----
group-by
 ├── columns: max:5(int) min:6(int) i:2(int) s:3(string)
 ├── grouping columns: i:2(int) s:3(string)
 ├── stats: [rows=1000, distinct(2,3)=1000]
 ├── cost: 1130
 ├── key: (2,3)
 ├── fd: (2,3)-->(5,6)
 ├── scan a
 │    ├── columns: k:1(int!null) i:2(int) s:3(string)
 │    ├── stats: [rows=1000, distinct(2,3)=1000]
 │    ├── cost: 1070
 │    ├── key: (1)
 │    └── fd: (1)-->(2,3)
 └── aggregations [outer=(1)]
      ├── max [type=int, outer=(1)]
      │    └── variable: k [type=int, outer=(1)]
      └── min [type=int, outer=(1)]
           └── variable: k [type=int, outer=(1)]
