my $sth = "select count * from tableA where tableA.key1 = tableB.key2";