All,

Say I had a table of apples:

CREATE TABLE Apples (
ID INTEGER PRIMARY KEY,
Color TEXT COLLATE NOCASE, --Could be Red, Green, or Yellow
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.
Should that function insert its results into a table that looks like the one 
below, or is there a better way?

CREATE TABLE Groups (
ID INTEGER PRIMARY KEY,
AppleID1 INTEGER
AppleID2 INTEGER
AppleID3 INTEGER
AppleID4 INTEGER
);

These apples are part of a communication system and there will always be 
exactly 4 in each group.

My concern is, from the Groups table how to do I find the number of groups of 
red apples, or groups of green apples that weight approx. 80 grams and are 
approx. 10cm tall without including redundant information from the Apples table?

Any advice is appreciated.

Thanks,
--
Bill Drago
Staff Engineer
L3 Narda-MITEQ
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com


CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to