Select statement

Hi experts

I am new to ax

i have one doubt, i created one table , data will come in to this table from aother externeal system.after filling the data in this table(my table) i have to validate the tables vendtable and logistic electroni adress tables.requirement is if vendor already existed with same adress with same mobile no and email we no need insert record through error,if vendor come from with same name and differrnt address and different email and no i have to inser record.

how can i write select statement for this.please suggest me.

thanks in advance