Thank you very much Igor!!, Your advices were very helpful. Do you know some good literature to learn/improve SQL knowledge ??
Best reg. Wojciech W. -----Original Message----- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Monday, March 05, 2007 2:21 PM To: SQLite Subject: [sqlite] Re: Re: Why it does not work properly? woj <[EMAIL PROTECTED]> wrote: > Thank's for your reply. I didnt realize this, but of course it is > logical. So, now I think how to select not only one row (what seems > to be easy) but set of rows from previously mentioned data where only > these rows are picked up with largest Data value for each IdMat, so > correct version of querry: > SELECT Mieszalnia.IdMat, Mieszalnia.Partia, Mieszalnia.Kont, > Mieszalnia.Uk, Max(Mieszalnia.Data) FROM Mieszalnia GROUPED BY > Mieszalnia.IdMat; I'm not sure if this was meant as a question or a statement. In case it was in fact a question, consider this: select IdMat, ..., Data from Mieszalnia m1 where not exists ( select * from Mieszalnia m2 where m2.IdMat = m1.IdMat and m2.Data > m1.Data ); Igor Tandetnik ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------