Re: [sqlite] Counting rows in multiple tables and joining on an index

2008-02-18 Thread Trey Mack
create table t1 (rpsIndex INTEGER); create table t2 (rpsIndex INTEGER); create table t3 (rpsIndex INTEGER); insert into t1 values (1); insert into t1 values (1); insert into t1 values (2); insert into t2 values (1); insert into t2 values (2); insert into t2 values (3); insert into t3 values (3); i

[sqlite] Counting rows in multiple tables and joining on an index

2008-02-18 Thread jrpfinch
I have three tables, each of which has the column rpsIndex. This column is not a unique index/primary key. I would like to count the number of times each rpsIndex appears in all three tables. E.g. Table1 rpsIndex=1 rpsIndex=1 rpsIndex=2 Table2 rpsIndex=1 rpsIndex=2 rpsIndex=3 Table3 rpsIndex=3