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. 1811935 fiddles created (25311 in the last week).

CREATE TABLE Temp(Xdate DATE, Xmessage varchar(20)); insert into Temp values ('2020-05-15','測試'); insert into Temp values ('2020-05-15','xx'); insert into Temp values ('2020-06-13 ','測試'); insert into Temp values ('2020-06-15','測試'); insert into Temp values ('2020-06-19','測試'); insert into Temp values ('2020-06-19','zz'); insert into Temp values ('2020-06-19','zz'); insert into Temp values ('2020-06-19','zz'); insert into Temp values ('2020-06-19','yy');
 hidden batch(es)


select Substring(Xdate,1,7) as XMonth,Xmessage,count(Xmessage) as XCount from Temp where Xmessage = '測試' group by Substring(Xdate,1,7),Xmessage
XMonth Xmessage XCount
2020-05 測試 1
2020-06 測試 3
 hidden batch(es)