Make the toy work in SQL