working on target licenses sql.