Escape column names to be able to sort by otherwise-reserved columns

I was getting SQL errors trying to sort on a column named `key` . Surrounding column names with backticks makes the queries not break when column names happen to be SQL reserved words.