drop table if exists EBI_736_A;
create table if not exists EBI_736_A
(
id1 int,
id2 int,
id3 int,
someString1 varchar(100),
someString2 varchar(100),
someString3 varchar(100)
);
insert into EBI_736_A values
(1,2,3,"a","b","c"),
(2,3,4,"d","e","f"),
(3,4,5,"g","h","i");

SELECT 
   COUNT(DISTINCT(`ebi_736_a`.`id1`)),
   COUNT(DISTINCT(`ebi_736_a`.`id2`)),
   COUNT(DISTINCT(`ebi_736_a`.`id3`)),
   `ebi_736_a`.`someString3`,
   `ebi_736_a`.`someString2`,
   `ebi_736_a`.`someString1`,
   `ebi_736_a`.`id2`,
   `ebi_736_a`.`id1`,
   `ebi_736_a`.`id3`
FROM `ebi_736_a`
GROUP BY 
   `ebi_736_a`.`id1`,
   `ebi_736_a`.`id2`,
   `ebi_736_a`.`id3`,
   `ebi_736_a`.`someString1`,
   `ebi_736_a`.`someString2`,
   `ebi_736_a`.`someString3`;
   
-- ==> WORKS

drop table if exists EBI_736_A_CS;
create table if not exists EBI_736_A_CS
(
id1 int,
id2 int,
id3 int,
someString1 varchar(100),
someString2 varchar(100),
someString3 varchar(100)
) ENGINE=Columnstore;

insert into EBI_736_A_CS values
(1,2,3,"a","b","c"),
(2,3,4,"d","e","f"),
(3,4,5,"g","h","i");

SELECT 
   COUNT(DISTINCT(`ebi_736_a_cs`.`id1`)),
   COUNT(DISTINCT(`ebi_736_a_cs`.`id2`)),
   COUNT(DISTINCT(`ebi_736_a_cs`.`id3`)),
   `ebi_736_a_cs`.`someString2`,
   `ebi_736_a_cs`.`someString1`,
   `ebi_736_a_cs`.`someString3`,
   `ebi_736_a_cs`.`id1`,
   `ebi_736_a_cs`.`id3`,
   `ebi_736_a_cs`.`id2`
FROM `ebi_736_a_cs`
GROUP BY 
   `ebi_736_a_cs`.`id1`,
   `ebi_736_a_cs`.`id2`,
   `ebi_736_a_cs`.`id3`,
   `ebi_736_a_cs`.`someString1`,
   `ebi_736_a_cs`.`someString2`,
   `ebi_736_a_cs`.`someString3`;
-- MariaDB 10.5:
-- ==> Error Code: 1815. Internal error: IDB-2035: An internal error occurred.  Check the error log file & contact support.	0.047 sec

-- MariaDB 10.6: WORKS!!!
