add sql statement for targets