A complete implementation of Tetris in a SQL query.