2008/11/19 wojtek <[EMAIL PROTECTED]>: > Hiall, > I have a problem with a query that I thought is easy. I have a database > containing a following data: > CREATE TABLE [Magazyn] > ( > [IdMagazyn] integer PRIMARY KEY AUTOINCREMENT , > [IdMat] integer, > [Partia] varchar (10), > [Ilosc] integer, > [DelK] integer DEFAULT 0, > [Mdata] integer > ) > Then, I have the following data in this Table: > Id IdMat Partia Ilosc DelK > 1 6 1457714 900 1 > 5 6 1457714 900 1 > 6 6 1457714 480 1 > 7 6 1476051 900 0 > . > . > . > and as a result of the query I need to select a list of 'Partia' for a > choosen IdMat, that meens (example IdMat=6): > Id IdMat Partia > 1 6 1457714 > 7 6 1476051 > 14 6 1479230 > and of course 'Partia' number is selected only once. > > How should this query look like?
select IdMagazyn, IdMat, Partia from Magazyn where IdMat=6 group by Partia; > Regards > WojciechW. Rgds, Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users