Added template SQL solution. TODO, replace with our classes and code
after personal design questions addressed.