I want to use some argument a few times in same query. How can I do this without duplication of this argument?
This works, but we have to use this argument twice
connection.query('SELECT ? FROM ?', [usr, usr],...)
I tried this, but it doesn't work (syntax error):
connection.query('SET @param = users; SELECT @param FROM @param',...)
...WHERE date = @param_date