<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1490361917476_38386"><br></div><div id="yui_3_16_0_ym19_1_1490361917476_38386"><span><br></span></div><div id="yui_3_16_0_ym19_1_1490361917476_38386"><span id="yui_3_16_0_ym19_1_1490361917476_38482">Estou com um arquivo neste formato.</span></div><div id="yui_3_16_0_ym19_1_1490361917476_38386"><span><br></span></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><img class="ymail-preserve-class inline-image-guid-410c1851-0d93-7723-1ba9-49839e5b21b7 rte-inline-saved-image" src="cid:92af2cbd-f559-09a7-cf8d-c102ba4fb9eb@yahoo.com" data-id="inline-image-guid-410c1851-0d93-7723-1ba9-49839e5b21b7" alt="Alinhar imagem" style="width:100%;max-width:283px;max-height:215px;" id="yui_3_16_0_ym19_1_1490361917476_38483"></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr">Estou querendo agregar por paciente. Informando a média da coluna valor_int e quero também pegar a menor e a maior data da coluna data_int.Quero que o arquivo fique assim;</div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><img class="ymail-preserve-class inline-image-guid-f6bab553-557d-ec77-b321-5ad86186c671 rte-inline-saved-image img-overlay-selected" src="cid:6456206d-5ac4-062e-8624-1620ea5bbe8e@yahoo.com" data-id="inline-image-guid-f6bab553-557d-ec77-b321-5ad86186c671" alt="Alinhar imagem" style="width:100%;max-width:579px;max-height:309px;" id="yui_3_16_0_ym19_1_1490361917476_39083"><br><br></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39160"><br id="yui_3_16_0_ym19_1_1490361917476_39163"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39165"><br id="yui_3_16_0_ym19_1_1490361917476_39168"></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr">Desenvolvi esse codigo.</div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285"><img class="ymail-preserve-class inline-image-guid-cd609d20-f9cd-7471-300f-5f0c06a7dfe4 rte-inline-saved-image" src="cid:a8f25844-4cf4-7199-84ad-8de287d1fc15@yahoo.com" data-id="inline-image-guid-cd609d20-f9cd-7471-300f-5f0c06a7dfe4" alt="Alinhar imagem" style="width:100%;max-width:569px;max-height:241px;" id="yui_3_16_0_ym19_1_1490361917476_39511"><br><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285">agora estou tentando colocar as datas.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285"><img class="ymail-preserve-class inline-image-guid-c7c421ae-5f76-8a9f-424b-42b1652cffa1 rte-inline-saved-image" src="cid:74fdc16a-f745-2bb8-727a-5a09a4cd2721@yahoo.com" data-id="inline-image-guid-c7c421ae-5f76-8a9f-424b-42b1652cffa1" alt="Alinhar imagem" style="width:100%;max-width:706px;max-height:98px;" id="yui_3_16_0_ym19_1_1490361917476_40049"><br id="yui_3_16_0_ym19_1_1490361917476_40050"><br id="yui_3_16_0_ym19_1_1490361917476_40051"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39286"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490361917476_39286"><br></div><div id="yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><span><br></span></div><div></div><div id="yui_3_16_0_ym19_1_1490361917476_38385"> </div><div class="signature" id="yui_3_16_0_ym19_1_1490361917476_38384"><div id="yui_3_16_0_ym19_1_1490361917476_38383"><font color="#0000ff" id="yui_3_16_0_ym19_1_1490361917476_39157">Edmar</font></div></div></div></body></html>