On Thu, 16 Jun 2016 20:53:25 +0000 "Drago, William @ CSG - NARDA-MITEQ" <william.dr...@l-3com.com> wrote:
> CREATE TABLE Apples ( > ID INTEGER PRIMARY KEY, > Color TEXT COLLATE NOCASE, --Could be Red, Green, or Yellow check Color in ( 'Red', 'Green', 'Yellow' ), -- FTFY > Height REAL, --Measured in cm > Width REAL --Measured in cm > Weight REAL --Measured in grams > ); > > And say I had a function that looks at the Apples table and finds > groups of 4 apples that match in color, dimensions, and weight. create view FourApples as select max(ID) as ID , Color, Height, Width, Weight from Apples group by Color, Height, Width, Weight having count(*) = 4 ; Why bother with a table? --jkl _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users