In a SQLDatasource I hve the following sql
SELECT
Locations.Name,
COUNT(*) AS TotalCars,
SUM(CASE WHEN StockType = 'NEW' OR StockType = 'DEMO' THEN 1 ELSE 0 END) AS TotalNewAndDemoCars,
SUM(CASE WHEN StockType = 'USED' THEN 1 ELSE 0 END) AS TotalUsedCars,
SUM(CASE WHEN StockType = 'NEW' AND Make = 'MAZD' THEN 1 ELSE 0 END) AS NewMazds,
SUM(CASE WHEN StockType = 'NEW' AND Make = 'MITS' THEN 1 ELSE 0 END) AS NewMits,
SUM(CASE WHEN StockType = 'NEW' AND Make = 'HYUN' THEN 1 ELSE 0 END) AS NewHyun
FROM InventoryDataLive INNER JOIN Locations ON InventoryDataLive.Company = Locations.LocationsID
GROUP BY Locations.Name
This works fine but now I want to use a filter expression to filter the results by price of the cars included in the above results, like all cars > 25,000 should be the only cars in the counts.
But the price is not in the SQL.
How would I do the filtering??
...
Go to the complete details ...