Продажа новой техники - FAW
SELECT TOP 100
PERCENT dbo.car_price_type.link, dbo.car_price_type.name AS tname, COUNT(dbo.car_price_type.link) AS qnt, dbo.car_price_type.names, dbo.car_price_type_sort.sort
FROM dbo.car_price_type_sort RIGHT OUTER JOIN dbo.car_price_type ON dbo.car_price_type_sort.type = dbo.car_price_type.link RIGHT OUTER JOIN dbo.cross_main ON dbo.car_price_type.link = dbo.cross_main.price_type WHERE (dbo.cross_main.techosmotr = 1) AND (dbo.car_price_type.nv = 0) AND (dbo.cross_main.tip > 4) AND (dbo.cross_main.tip < 8)
AND (dbo.car_price_type_sort.brand = 88) GROUP BY dbo.car_price_type.name, dbo.car_price_type.link, dbo.car_price_type.names, dbo.car_price_type_sort.sort ORDER BY dbo.car_price_type_sort.sort, dbo.car_price_type.name