Sql Query Data From Two Different Ionic Compounds