SELECT r1.* FROM robots r1
JOIN (SELECT IDaukce, MIN(counter) max_counter FROM robots r2 GROUP BY IDaukce) r2
ON r1.IDaukce = r2.IDaukce AND r1.counter = r2.max_counter;
+----+---------+-------+---------+
| ID | IDaukce | uziv | counter |
+----+---------+-------+---------+
| 2 | 1 | Chuck | 0 |
| 3 | 2 | Chuck | 0 |
+----+---------+-------+---------+
| Subject | Views | Written By | Posted |
|---|---|---|---|
| Subselect and walking throught result with cursor | 3107 | Jan Jůna | 09/13/2010 01:17PM |
| Re: Subselect and walking throught result with cursor | 1090 | Devart Team | 09/14/2010 01:13AM |
| Re: Subselect and walking throught result with cursor | 1074 | Jan Jůna | 09/15/2010 04:42AM |
| Re: Subselect and walking throught result with cursor | 1257 | Devart Team | 09/16/2010 01:27AM |
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.