If you could perhaps post the SQL view of your query, someone might be
able to answer.
You're getting the message "Invalid Argument" because somewhere in
your query - perhaps in some function call - you are using an invalid
argument. I cannot see your screen, so I can't even guess what
functions your calling or what arguments you're trying to provide
them.