mam problem z prostym(?) zapytaniem:
Kod
select `seria` from `serie` having `seria`<max(`seria`);
, wyswietla ono wynik tylko 1;ale:
Kod
select `seria` from `serie` having `seria`<3;
wyswietla wszystko swietnie;zrzut bazy danych
-- -------------------------------------------------------- -- -- Struktura tabeli dla `serie` -- CREATE TABLE `serie` ( `seria` int(11) NOT NULL, `gracz` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Zrzut danych tabeli `serie` -- INSERT INTO `serie` (`seria`, `gracz`) VALUES (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 3);
edit:
problem rozwiazany:
Kod
select `seria` from `serie` having `seria`<(select max(seria) from serie);