dobry wieczor
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
  1. -- --------------------------------------------------------
  2.  
  3. --
  4. -- Struktura tabeli dla `serie`
  5. --
  6.  
  7. CREATE TABLE `serie` (
  8. `seria` int(11) NOT NULL,
  9. `gracz` int(11) NOT NULL
  10. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  11.  
  12. --
  13. -- Zrzut danych tabeli `serie`
  14. --
  15.  
  16. INSERT INTO `serie` (`seria`, `gracz`) VALUES
  17. (1, 1),
  18. (1, 2),
  19. (1, 3),
  20. (1, 4),
  21. (2, 3),
  22. (2, 4),
  23. (3, 3);


edit:
problem rozwiazany:
Kod
select `seria` from `serie` having `seria`<(select max(seria) from serie);