Replace Temp with Query on variable thisAmount