Actually add new SQL code

I forgot to git-add before creating commit 00ec7bb (Start rewriting to
use SQL).  Here are the files that commit needs to function correctly.
Merge remote-tracking branch 'origin/master'