-2

for the following to statements I have duplicated code, how can I refactor it ?
statement 1
SELECT "partyObject", "propertyDisplayName", "leasedUnitName", (rankExact * ${searchValues.exactValue}) + ${wordsTomatch.map((word, index) => (rankWord${index} * ${searchValues.wordRank}) +).join(' ')} (ra...