Fix reference SQL.  Closes #2.  Thanks @Dunecat