Details
-
Sub-Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
6.1.1
-
None
-
2020-1, 2020-2, 2020-3, 2020-4, 2020-5, 2020-6, 2020-7, 2021-1, 2021-2, 2021-3, 2021-4, 2021-5, 2021-6, 2021-7, 2021-8, 2021-9
Description
Consider the example:
MariaDB [test]> select CCHAR9, regr_avgx(CDECIMAL9_2, length(CCHAR9)) from datatypetestm1 where CCHAR9 in ('zzzzzzzzz','iiii') group by CCHAR9;
|
+-----------+----------------------------------------+
|
| CCHAR9 | regr_avgx(CDECIMAL9_2, length(CCHAR9)) |
|
+-----------+----------------------------------------+
|
| iiii | 9.000000 |
|
| zzzzzzzzz | 9.000000 |
|
+-----------+----------------------------------------+
|
2 rows in set (0.021 sec)
|
 |
|
The expected output must be this:
MariaDB [test]> select CCHAR9, regr_avgx(CDECIMAL9_2, length(CCHAR9)) from datatypetestm1 where CCHAR9 in ('zzzzzzzzz','iiii') group by CCHAR9;
|
+-----------+----------------------------------------+
|
| CCHAR9 | regr_avgx(CDECIMAL9_2, length(CCHAR9)) |
|
+-----------+----------------------------------------+
|
| iiii | 4.000000 |
|
| zzzzzzzzz | 9.000000 |
|
+-----------+----------------------------------------+
|
2 rows in set (0.021 sec)
|