"select read_epoch=0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' group by read_epoch=0,read_flags;",
myid,domain_name,myfolder);
sql=switch_mprintf(
"select 1, read_flags, count(read_epoch) from voicemail_msgs where "
"username='%q' and domain='%q' and in_folder='%q' and read_epoch=0 "
"group by read_flags "
"union "
"select 0, read_flags, count(read_epoch) from voicemail_msgs where "
"username='%q' and domain='%q' and in_folder='%q' and read_epoch<>0 "