clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2335808 fiddles created (27459 in the last week).

CREATE TABLE table1( type VARCHAR(1) NOT NULL , day INTEGER NOT NULL );
 hidden batch(es)


begin INSERT INTO table1 VALUES ('A',1); INSERT INTO table1 VALUES ('A',1); INSERT INTO table1 VALUES ('A',1); INSERT INTO table1 VALUES ('A',1); INSERT INTO table1 VALUES ('B',1); INSERT INTO table1 VALUES ('B',1); INSERT INTO table1 VALUES ('A',2); INSERT INTO table1 VALUES ('A',2); INSERT INTO table1 VALUES ('A',2); INSERT INTO table1 VALUES ('A',2); INSERT INTO table1 VALUES ('A',2); INSERT INTO table1 VALUES ('B',2); INSERT INTO table1 VALUES ('B',2); INSERT INTO table1 VALUES ('B',2); INSERT INTO table1 VALUES ('B',2); INSERT INTO table1 VALUES ('B',2); INSERT INTO table1 VALUES ('B',2); INSERT INTO table1 VALUES ('B',2); end; /
1 rows affected
 hidden batch(es)


SELECT TYPE, DAY, COUNT(1) FROM table1 GROUP BY TYPE, DAY ORDER BY DAY
TYPE DAY COUNT(1)
A 1 4
B 1 2
A 2 5
B 2 7
 hidden batch(es)