Например есть таблица:
create table `test` (
`id` int not null auto_increment,
`dop_id` int not null,
`time` datetime not null
);
с записями
insert into `test` (`dop_id`, `time`) value (1,now());
insert into `test` (`dop_id`, `time`) value (1,now());
insert into `test` (`dop_id`, `time`) value (1,now());
insert into `test` (`dop_id`, `time`) value (2,now());
insert into `test` (`dop_id`, `time`) value (2,now());
insert into `test` (`dop_id`, `time`) value (2,now());
insert into `test` (`dop_id`, `time`) value (3,now());
insert into `test` (`dop_id`, `time`) value (3,now());
insert into `test` (`dop_id`, `time`) value (3,now());
нужно выбрать по одной последней записи c dop_id 1,2 и 3.

Ответ на:
комментарий
от aol

Ответ на:
комментарий
от TDrive

Ответ на:
комментарий
от aol

Ответ на:
комментарий
от Ja-Ja-Hey-Ho


Ответ на:
комментарий
от Kalashnikov

Ответ на:
комментарий
от aol

Ответ на:
комментарий
от TDrive

Ответ на:
комментарий
от Kalashnikov

Ответ на:
комментарий
от no-dashi

Ответ на:
комментарий
от Kalashnikov

Ответ на:
комментарий
от no-dashi

Ответ на:
комментарий
от Harald

Ответ на:
комментарий
от no-dashi

Ответ на:
комментарий
от berrywizard

Ответ на:
комментарий
от berrywizard

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум составить «простой» SQL запрос (2006)
- Форум [mysql] Чудо (2010)
- Форум Запрос sql (2014)
- Форум переустановить auto_increment (2010)
- Форум [sql] [mysql] Помогите составить запрос (2010)
- Форум [MySQL] кодировка передаваемых в процедуру параметров. (2011)
- Форум Помогите составить запрос (2013)
- Форум mysql запрос (2007)
- Форум MySQL: multiple insert (2008)
- Форум SQL+PHP (2010)