def check_agg_loc_join_3(db, t1, t2):
    # t1.shape, t2.shape
    q = """select %s.id, count(*) from %s, %s where
      %s.shape ~ %s.shape
      group by %s.id""" % (t1, t1, t2, t1, t2, t1)
    return db.execute(q).fetchall()
dataset/ETHPy150Open sirrice/dbtruck/dbtruck/analyze/fuzzyjoin.py/check_agg_loc_join_3/original