created the sql statement with variable