const wait = time => new Promise(r => setTimeout(r, time));
wait(1000)
.then(() => { console.log(1); return wait(1000); })
.then(() => { console.log(2); return wait(1000); })
.then(() => { console.log(3); });
// или
[ 1, 2, 3 ].reduce((promise, n) => promise
.then(() => wait(1000))
.then(() => console.log(n))
, Promise.resolve());
$query1 = Product::find()->andWhere(['>','price',0])->orderBy('price');
$query2 = Product::find()->andWhere(['price'=>0]);
$query1->union($query2);
$query1->all(); // или скормили дата провайдеру