matchId => matchid since postgres doesn't support capitals
add quotes around variables
merge