Hi, thanks a lot for the helpful replies. Sorry to bother again, but there is still something that hasn't been answered.
Simon Slavin-3 has addressed my question but not exactly what I was asking. Suppose I have two tables "movies" and "people" and other tables to relate both tables: "directors", "writers", etc... Simon Slavin-3 told me to create one single table to relate "movies" and "people": MoviePeople: id, movie, person, capacity But with that solution I can't perform the fast count(*) that I want. I would have to do: SELECT count(distinct person) FROM MoviePeople WHERE capacity = "director"; I want to know if there is any standard solution for normalizing this database so I can do count(*) to count all directors or writers... Thanks in advance for your help and patience. -- View this message in context: http://old.nabble.com/Speed-up-count%28distinct-col%29-tp30864622p30892423.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users