Вы также можете попробовать ...
select A.OrderID, A.ItemCount,B.TotalCopyCost, C.TotalFullPrice
from (select OrderID, count(*) as ItemCount from orderdetails) as A,
(select OrderID, sum(CopyCost) as TotalCopyCost from orderdetails where PriceType = 'CopyCost') as B,
(select OrderID, sum(FullPrice) as TotalFullPrice from orderdetails where PriceType = 'FullPrice') as C
where A.OrderID = B.OrderID
SQLFiddle: http://sqlfiddle.com/#!2/946af/6
Вы можете попробовать переопределить некоторые требования следующим образом:
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.14",
"yiisoft/yii2-bootstrap": "~2.0.8",
"yiisoft/yii2-bootstrap4": "1.0.x-dev",
"bower-asset/bootstrap": "3.3.7 as 4.0.0",
"npm-asset/bootstrap": "~4.0.0"
},
Это установит bootstrap 3.3.7 из bower и bootstrap 4.0.0 из npm. Вам нужно обновить путь к пакетам для загрузки bootstrap4:
'components' => [
'assetManager' => [
'bundles' => [
'yii\boostrap4\BootstrapAsset' => [
'sourcePath' => '@npm/bootstrap/dist'
],
'yii\bootstrap4\BootstrapPluginAsset' => [
'sourcePath' => '@npm/bootstrap/dist'
]
]
]
]
Обратите внимание, что yii2-bootstrap4
не готов к использованию и даже не имеет альфа-бета-версии, поэтому ожидайте многие другие проблемы.