apex – Not getting split value in dynamic soql query

Please help me how to get value for split values “valueArray[1]” in below query.

I am trying to fetch the records, but i found issue in writing dynamic query.
Please let me know if I am missing syntax in belowsoql query.

List<String> valueArray = new List<String>();
    for(String strValues : listOfValues) {
     valueArray = strValues.split('-');
     Integer intValue = Integer.ValueOf(valueArray[1]);
    
    for(sObject sObj : Database.query('SELECT Id FROM ' + valueArray[0] + ' WHERE CreatedDate < Last_N_Days:intValue ')) {
    }

Read more here: Source link