First draft of solution.sql code