INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727894117158','3','','100054','2024-10-02','2024-10-02','08:00:00','18:00:00','Pendente','40','40','','-1727894117158','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727894117158','3','','100054','2024-10-02','2024-10-02','','','','','40','','-1727894197076','','') - 40; UPDATE agenda_tarefa SET idPrimario = 37100 WHERE idPrimario = -1727894117158 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37100 WHERE tarefa = -1727894117158 - 40; UPDATE agenda_resposta_formulario SET tarefa = 37101 WHERE tarefa = -1727894197076 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37101 WHERE tarefa = -1727894197076 - 40; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; insert into agenda_tarefa (idPrimario, assunto, vendedor, dataCriacao, dataInsercao, data, horario_inicial, horario_final, usuario, supervisor, idOriginal, observacao, clientes, resumo, status) select date_format(now(),'%Y%m%d%H%i%s') * -1, 999, b.vendedor, curdate(), now(), a.prazo, '08:00:00', '08:00:00', b.supervisor, b.supervisor, date_format(now(),'%Y%m%d%H%i%s') * -1, a.acao, '', '', 'Pendente' FROM agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b where a.tarefaAgendada is null and a.tarefa = b.id ; - 40; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37100','3','','100054','2024-10-02','2024-10-02','','','','','40','','-1727894227393','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37100','3','','100054','2024-10-02','2024-10-02','','','','','40','','-1727894248133','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37100','3','','100054','2024-10-02','2024-10-02','','','','','40','30508401','-1727894289068','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37100','3','','100054','2024-10-02','2024-10-02','','','','','40','30818301','-1727894341101','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727894404314','3','','100054','2024-10-02','2024-10-03','08:00:00','18:00:00','Pendente','40','40','','-1727894404314','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37100','3','','100054','2024-10-02','2024-10-02','','','','','40','30322901','-1727894470340','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727895286603','7','DESLOCAMENTO ATÉ PELOTAS RS','0','2024-10-02','2024-10-01','08:00:00','12:00:00','Finalizado','40','40','','-1727895286603','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727895344077','3','','100054','2024-10-02','2024-10-01','14:00:00','18:00:00','Pendente','40','40','','-1727895344077','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727895383309','1003','Entrevista para a região de Santiago. ','0','2024-10-02','2024-10-01','18:00:00','18:30:00','Finalizado','40','40','','-1727895383309','','') - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','112','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','114','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','208','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894289068','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','110','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','112','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','208','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727894341101','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('-1727895286603','','Cheguei em Pelotas. Almocei e encontrei com o vendedor','') - 40; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('-1727895383309','2024-10-02','Motivado. Bom candidato. Possui representação numa pasta já.','Conversar com o Edimar sobre. Seguir procurando candidatos.') - 40; UPDATE agenda_resposta_formulario SET tarefa = 37102 WHERE tarefa = -1727894227393 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37102 WHERE tarefa = -1727894227393 - 40; UPDATE agenda_resposta_formulario SET tarefa = 37103 WHERE tarefa = -1727894248133 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37103 WHERE tarefa = -1727894248133 - 40; UPDATE agenda_resposta_formulario SET tarefa = 37104 WHERE tarefa = -1727894289068 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37104 WHERE tarefa = -1727894289068 - 40; UPDATE agenda_resposta_formulario SET tarefa = 37105 WHERE tarefa = -1727894341101 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37105 WHERE tarefa = -1727894341101 - 40; UPDATE agenda_tarefa SET idPrimario = 37106 WHERE idPrimario = -1727894404314 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37106 WHERE tarefa = -1727894404314 - 40; UPDATE agenda_resposta_formulario SET tarefa = 37107 WHERE tarefa = -1727894470340 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37107 WHERE tarefa = -1727894470340 - 40; UPDATE agenda_tarefa SET idPrimario = 37108 WHERE idPrimario = -1727895286603 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37108 WHERE tarefa = -1727895286603 - 40; UPDATE agenda_tarefa SET idPrimario = 37109 WHERE idPrimario = -1727895344077 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37109 WHERE tarefa = -1727895344077 - 40; UPDATE agenda_tarefa SET idPrimario = 37110 WHERE idPrimario = -1727895383309 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37110 WHERE tarefa = -1727895383309 - 40; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; insert into agenda_tarefa (idPrimario, assunto, vendedor, dataCriacao, dataInsercao, data, horario_inicial, horario_final, usuario, supervisor, idOriginal, observacao, clientes, resumo, status) select date_format(now(),'%Y%m%d%H%i%s') * -1, 999, b.vendedor, curdate(), now(), a.prazo, '08:00:00', '08:00:00', b.supervisor, b.supervisor, date_format(now(),'%Y%m%d%H%i%s') * -1, a.acao, '', '', 'Pendente' FROM agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b where a.tarefaAgendada is null and a.tarefa = b.id ; - 40; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; sqlCabecalho-> SELECT a.idPrimario, f.descricao, concat(b.supervisor,' - ',g.nome) supervisor, concat(b.vendedor,' - ',h.nome) vendedor, DATE_FORMAT(b.data, '%d/%m/%Y') as data, b.horario_inicial, b.horario_final, b.supervisor, b.vendedor FROM agenda_tarefa a, agenda_tarefa b left join agenda_assunto f on b.assunto = f.id left join vendedor g on b.supervisor = g.id left join vendedor h on b.vendedor = h.id, agenda_resposta_formulario c left join agenda_item d on c.item = d.id left join agenda_grupo e on d.grupo = e.id WHERE a.idPrimario = b.id AND a.id = c.tarefa AND a.idPrimario = '37108' GROUP BY a.idPrimario - 40; Binding output parameters deu certo: ( 0) - 40; FORM VENDEDOR 20 - 40; GRUPO->

Grupos:

Grupo Qtd Percentual
- 40; Respostas->

Questões:

GrupoQuestõesQtdPercentual
- 40; statusNaoFinalizado - 40; sqlCabecalho-> SELECT a.idPrimario, f.descricao, concat(b.supervisor,' - ',g.nome) supervisor, concat(b.vendedor,' - ',h.nome) vendedor, DATE_FORMAT(b.data, '%d/%m/%Y') as data, b.horario_inicial, b.horario_final, b.supervisor, b.vendedor FROM agenda_tarefa a, agenda_tarefa b left join agenda_assunto f on b.assunto = f.id left join vendedor g on b.supervisor = g.id left join vendedor h on b.vendedor = h.id, agenda_resposta_formulario c left join agenda_item d on c.item = d.id left join agenda_grupo e on d.grupo = e.id WHERE a.idPrimario = b.id AND a.id = c.tarefa AND a.idPrimario = '37110' GROUP BY a.idPrimario - 40; Binding output parameters deu certo: ( 0) - 40; FORM VENDEDOR 20 - 40; GRUPO->

Grupos:

Grupo Qtd Percentual
- 40; Respostas->

Questões:

GrupoQuestõesQtdPercentual
- 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37100','3','','100054','2024-10-02','2024-10-02','','','','','40','30028601','-1727902936452','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727914820162','6','REUNIÃO SEMANAL EDIMAR','0','2024-10-02','2024-10-03','18:00:00','18:30:00','Pendente','40','40','','-1727914820162','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727915090455','7','RETORNO SM ','0','2024-10-02','2024-10-04','08:00:00','13:00:00','Pendente','40','40','','-1727915090455','','') - 40; UPDATE agenda_tarefa SET assunto ='4', observacao = '', vendedor='100054', dataCriacao = '2024-10-02', data = '2024-10-03', horario_inicial = '16:00:00', horario_final = '16:30:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '37106' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','110','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','112','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','208','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','210','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('37107','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','110','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1727902936452','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; UPDATE agenda_resposta_formulario SET tarefa = 37119 WHERE tarefa = -1727902936452 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37119 WHERE tarefa = -1727902936452 - 40; UPDATE agenda_tarefa SET idPrimario = 37120 WHERE idPrimario = -1727914820162 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37120 WHERE tarefa = -1727914820162 - 40; UPDATE agenda_tarefa SET idPrimario = 37121 WHERE idPrimario = -1727915090455 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37121 WHERE tarefa = -1727915090455 - 40; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; insert into agenda_tarefa (idPrimario, assunto, vendedor, dataCriacao, dataInsercao, data, horario_inicial, horario_final, usuario, supervisor, idOriginal, observacao, clientes, resumo, status) select date_format(now(),'%Y%m%d%H%i%s') * -1, 999, b.vendedor, curdate(), now(), a.prazo, '08:00:00', '08:00:00', b.supervisor, b.supervisor, date_format(now(),'%Y%m%d%H%i%s') * -1, a.acao, '', '', 'Pendente' FROM agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b where a.tarefaAgendada is null and a.tarefa = b.id ; - 40; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1727915277515','3','','100054','2024-10-02','2024-10-03','08:00:00','15:00:00','Pendente','40','40','','-1727915277515','','') - 40; UPDATE agenda_tarefa SET assunto ='999', observacao = 'Conversar com o Edimar sobre. Seguir procurando candidatos.', vendedor='0', dataCriacao = '2024-10-02', data = '2024-10-02', horario_inicial = '08:00:00', horario_final = '08:00:00', status = 'Finalizado', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '37111' - 40; UPDATE agenda_tarefa SET assunto ='2', observacao = '', vendedor='100054', dataCriacao = '2024-10-02', data = '2024-10-03', horario_inicial = '15:00:00', horario_final = '16:00:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '37106' - 40; UPDATE agenda_tarefa SET assunto ='4', observacao = '', vendedor='100054', dataCriacao = '2024-10-02', data = '2024-10-04', horario_inicial = '08:00:00', horario_final = '09:00:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '37121' - 40; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('37111','','Candidato não aprovado pelo Edimar','') - 40; UPDATE agenda_tarefa SET idPrimario = 37122 WHERE idPrimario = -1727915277515 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 37122 WHERE tarefa = -1727915277515 - 40; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40; insert into agenda_tarefa (idPrimario, assunto, vendedor, dataCriacao, dataInsercao, data, horario_inicial, horario_final, usuario, supervisor, idOriginal, observacao, clientes, resumo, status) select date_format(now(),'%Y%m%d%H%i%s') * -1, 999, b.vendedor, curdate(), now(), a.prazo, '08:00:00', '08:00:00', b.supervisor, b.supervisor, date_format(now(),'%Y%m%d%H%i%s') * -1, a.acao, '', '', 'Pendente' FROM agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b where a.tarefaAgendada is null and a.tarefa = b.id ; - 40; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40; statusNaoFinalizado - 40; sqlCabecalho-> SELECT a.idPrimario, f.descricao, concat(b.supervisor,' - ',g.nome) supervisor, concat(b.vendedor,' - ',h.nome) vendedor, DATE_FORMAT(b.data, '%d/%m/%Y') as data, b.horario_inicial, b.horario_final, b.supervisor, b.vendedor FROM agenda_tarefa a, agenda_tarefa b left join agenda_assunto f on b.assunto = f.id left join vendedor g on b.supervisor = g.id left join vendedor h on b.vendedor = h.id, agenda_resposta_formulario c left join agenda_item d on c.item = d.id left join agenda_grupo e on d.grupo = e.id WHERE a.idPrimario = b.id AND a.id = c.tarefa AND a.idPrimario = '37111' GROUP BY a.idPrimario - 40; Binding output parameters deu certo: ( 0) - 40; FORM VENDEDOR 20 - 40; GRUPO->

Grupos:

Grupo Qtd Percentual
- 40; Respostas->

Questões:

GrupoQuestõesQtdPercentual
- 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40;