<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[query che restituisca solo l'ultimo record riferito ad una persona]]></title><description><![CDATA[<p dir="auto">ho questa query che seleziona tutti i risultati dalla tabella patient_visits<br />
patient_visits<code>LEFT JOIN</code>patients<code>as patients1 ON</code>patients1<code>.</code>id<code>=</code>patient_visits<code>.</code>patient`</p>
<p dir="auto">siccome in questa cartella possono essere inseriti più campi riferiti ad un solo paziente vorrei che venisse restituito solo l'ultimo in modo d'aver a colpo d'occhio solo l'ultima situazione e non l'intero storico, per fare un esempio</p>
<p dir="auto">se ora ho questi risultati</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th><strong>paziente</strong></th>
<th><strong>stato</strong></th>
<th><strong>data</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>Bruno</td>
<td>ok</td>
<td>16/05/16</td>
</tr>
<tr>
<td>Carlo</td>
<td>ok</td>
<td>15/05/16</td>
</tr>
<tr>
<td>Bruno</td>
<td>malato</td>
<td>15/05/16</td>
</tr>
<tr>
<td>Bruno</td>
<td>da rivedere</td>
<td>14/05/16</td>
</tr>
</tbody>
</table>
<p dir="auto">vorrei che mi venissero restituiti questi, ovvero solo l'ultimo stato e nascosti i precedenti</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>paziente</th>
<th>stato</th>
<th>data</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bruno</td>
<td>ok</td>
<td>16/05/16</td>
</tr>
<tr>
<td>Carlo</td>
<td>ok</td>
<td>15/05/16</td>
</tr>
</tbody>
</table>
<p dir="auto">avete per favore qualche consiglio?<br />
grazie</p>
]]></description><link>https://dev.connect.gt/topic/223406/query-che-restituisca-solo-l-ultimo-record-riferito-ad-una-persona</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 16:05:43 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/223406.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 May 2016 11:24:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to query che restituisca solo l'ultimo record riferito ad una persona on Tue, 17 May 2016 07:58:35 GMT]]></title><description><![CDATA[<p dir="auto">Ciao Bonox, se fai un select distinct paziente,stato,data e li ordini per data desc può funzionare?<br />
non avendo le tabelle purtroppo non riesco a provare la query</p>
]]></description><link>https://dev.connect.gt/post/1223147</link><guid isPermaLink="true">https://dev.connect.gt/post/1223147</guid><dc:creator><![CDATA[pietror]]></dc:creator><pubDate>Tue, 17 May 2016 07:58:35 GMT</pubDate></item></channel></rss>