fork(1) download
  1. CREATE TABLE t1 ( id integer );
  2. CREATE TABLE t2 ( id integer, id1 integer );
  3. INSERT INTO t1 VALUES(1);
  4. INSERT INTO t1 VALUES(2);
  5. INSERT INTO t2 VALUES(1, 1);
  6. INSERT INTO t2 VALUES(2, 1);
  7. INSERT INTO t2 VALUES(3, 1);
  8. SELECT t1.id,COUNT(t2.id) FROM t1 JOIN t2 ON t1.id=t2.id1 GROUP BY t2.id1;
Success #stdin #stdout 0s 3008KB
stdin
Standard input is empty
stdout
1|3