@@ -607,11 +607,11 @@ The result will look like this:
607
607
608
608
.. code-block :: none
609
609
610
- +--------------+-----------+-----------+-----------+------------- +
611
- | AVG(size) | SUM(size) | MIN(size) | MAX(size) | COUNT(size) |
612
- +--------------+-----------+-----------+-----------+------------- |
613
- | 5.413333E+02 | 1624 | 4 | 1432 | 3 |
614
- +--------------+-----------+-----------+-----------+------------- +
610
+ +--------------+-----------+-----------+-----------+-----------+
611
+ | COLUMN_1 | COLUMN_2 | COLUMN_3 | COLUMN_4 | COLUMN_5 |
612
+ +--------------+-----------+-----------+-----------+-----------|
613
+ | 5.413333E+02 | 1624 | 4 | 1432 | 3 |
614
+ +--------------+-----------+-----------+-----------+-----------+
615
615
616
616
Suppose that we want aggregations, but aggregations of rows that have some common characteristic.
617
617
Supposing further, we want to divide the rows into two groups, the ones whose names
@@ -628,12 +628,12 @@ The result will look like this:
628
628
629
629
.. code-block :: none
630
630
631
- +-------------------- +--------------+-----------+-----------+-----------+-------------+
632
- | SUBSTR(name, 1, 1) | AVG(size) | SUM(size) | MIN(size) | MAX(size) | CoUNT(size) |
633
- +-------------------- +--------------+-----------+-----------+-----------|-------------|
634
- | b | 1432 | 1432 | 1432 | 1432 | 1 |
635
- | c | 96 | 192 | 4 | 188 | 2 |
636
- +-------------------- +--------------+-----------+-----------+-----------|-------------+
631
+ +------------+--------------+-----------+-----------+-----------+-------------+
632
+ | COLUMN_1 | COLUMN_2 | COLUMN_3 | COLUMN_4 | COLUMN_5 | COLUMN_6 |
633
+ +------------+--------------+-----------+-----------+-----------|-------------|
634
+ | b | 1432 | 1432 | 1432 | 1432 | 1 |
635
+ | c | 96 | 192 | 4 | 188 | 2 |
636
+ +------------+--------------+-----------+-----------+-----------|-------------+
637
637
638
638
639
639
**Select with common table expression **
0 commit comments