import Errors from sqlalchemy
use normal and data track durations in one DB query

We shouldn't issue more queries than we need to.