Added test for raw SQL. Closes #1