Ide o dosť bežný problém, riešení je na webe veľa. Ak nechceš použiť view, tak si môžeš prečítať napríklad How to select the first/least/max row per group in SQL.
Ide o dosť bežný problém, riešení je na webe veľa. Ak nechceš použiť view, tak si môžeš prečítať napríklad How to select the first/least/max row per group in SQL.