Implement tile SQL and style generation