Just attach the other database first:
db.execSQL("ATTACH '/path/to/other.db' AS otherDB");db.rawQuery("SELECT * FROM Table1, otherDB.Table2 " + "WHERE Table1.id = otherDB.Table2.id_table1 " + "GROUP BY Table1.data1", null);