You apparently tried to run the SQL statement without using the -s option,
so it thought it was a url to add to the options table. Also, your SQL
statement was wrong. It should have been:
gw -d- -st "select * from querylog"
Having not used -s, you've gotten a bad option and lost your -o (and any
other special options) for -rewalk. You'll need to wipe the database and
perform a normal walk before being able to use -rewalk as desired again.
Also note that -rewalk does not take other options or urls except -d. And
that options come before urls or url lists.
gw -d- -wipe
gw -d- -o "&url.lst"
Then you will be able to use rewalk next time around:
gw -d- -rewalk