Каталог Товаров
Показано из товаров
[ClickHouseDB\Exception\DatabaseException] 
Syntax error: failed at position 167: GROUP BY R.ItemID HAVING sum(R.Sign) > 0 UNION ALL ( SELECT ItemID,Rating,CityID FROM ( SELECT RC.ItemID, sum(RC.Rating * RC.Sign) AS  Rating, any(CityID) as Ci. Expected non-empty parenthesized list of expressions 
IN:SELECT ItemID, Rating, CityID FROM ( SELECT R.ItemID, sum(R.Rating * R.Sign) AS Rating, any(CityID) as CityID FROM rate_v1 R WHERE R.CityID=128 AND R.SectionID IN () GROUP BY R.ItemID HAVING sum(R.Sign) > 0 UNION ALL ( SELECT ItemID,Rating,CityID FROM ( SELECT RC.ItemID, sum(RC.Rating * RC.Sign) AS  Rating, any(CityID) as CityID FROM rate_v1 RC WHERE RC.CityID=0 AND RC.SectionID IN () GROUP BY RC.ItemID HAVING sum(RC.Sign) > 0 ) ANY LEFT JOIN ( SELECT R.ItemID as ItemID, sum(R.Rating * R.Sign) AS Rating2, any(CityID) as CityID2 FROM rate_v1 R WHERE R.CityID=128 AND R.SectionID IN () GROUP BY R.ItemID HAVING sum(R.Sign) > 0 ) USING ItemID WHERE Rating2 = 0 ) ) ANY INNER JOIN ( SELECT * FROM items WHERE SectionID IN ()  ) USING ItemID ORDER BY Rating desc LIMIT 0,28 FORMAT JSON (62)
/data/web/local/php_interface/lib/phpClickHouse/src/Statement.php:170
#0: ClickHouseDB\Statement->error()
	/data/web/local/php_interface/lib/phpClickHouse/src/Statement.php:202
#1: ClickHouseDB\Statement->check()
	/data/web/local/php_interface/lib/phpClickHouse/src/Statement.php:219
#2: ClickHouseDB\Statement->init()
	/data/web/local/php_interface/lib/phpClickHouse/src/Statement.php:529
#3: ClickHouseDB\Statement->rows()
	/data/web/bitrix/php_interface/lib/Regmarkets/CElement.php:249
#4: Pdev\Regmarkets\CElement->getList(array, array, integer, integer, boolean)
	/data/web/bitrix/templates/goods_yandex_ver_6/components/bitrix/catalog/category/sections3_4_v2.php:61
#5: include(string)
	/data/web/bitrix/templates/goods_yandex_ver_6/components/bitrix/catalog/category/regmarkets_section_v2.php:71
#6: include(string)
	/data/web/bitrix/templates/goods_yandex_ver_6/components/bitrix/catalog/category/section.php:331
#7: include(string)
	/data/web/bitrix/modules/main/classes/general/component_template.php:535
#8: CBitrixComponentTemplate->__IncludePHPTemplate(array, array, string)
	/data/web/bitrix/modules/main/classes/general/component_template.php:618
#9: CBitrixComponentTemplate->IncludeTemplate(array)
	/data/web/bitrix/modules/main/classes/general/component.php:657
#10: CBitrixComponent->showComponentTemplate()
	/data/web/bitrix/modules/main/classes/general/component.php:605
#11: CBitrixComponent->includeComponentTemplate(string)
	/data/web/bitrix/components/bitrix/catalog/component.php:135
#12: include(string)
	/data/web/bitrix/modules/main/classes/general/component.php:535
#13: CBitrixComponent->__includeComponent()
	/data/web/bitrix/modules/main/classes/general/component.php:578
#14: CBitrixComponent->includeComponent(string, array, boolean)
	/data/web/bitrix/modules/main/classes/general/main.php:1012
#15: CAllMain->IncludeComponent(string, string, array, boolean)
	/data/web/index.php:273
#16: include_once(string)
	/data/web/bitrix/modules/main/include/urlrewrite.php:154
#17: include_once(string)
	/data/web/bitrix/urlrewrite.php:2