fork 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 left JOIN t2 ON t1.id=t2.id1 group by t1.id;
Success #stdin #stdout 0s 3008KB
stdin
Standard input is empty
stdout
1|3
2|0