Fix PgDataSource.best_order_metric(stock_id) - I could find how to batch queries in sequel, thus it issues two separate queries :-(. DRYied PgDataSource.