Hi, SELECT DISTINCT type_id FROM foods;
If I use 'distinct', any entry that shows up greater or equal to one time will only appear once. But I want to select an entry that appears <=n times and only show n times if it appears more than n times. I think that "group by" might help. But I'm not familiar with SQL enough yet. Would you please let me know what command to use? -- Regards, Peng _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users