Fix SQLAlchemy select and explain views.