add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE `order` (
id int auto_increment,
customer_id int null,
primary key(id)
);
INSERT INTO `order` (customer_id) VALUES (NULL);
SELECT id, COUNT(DISTINCT customer_id) FROM `order` GROUP BY id;
id COUNT(DISTINCT customer_id)
1 0