Hi,I have this SQL which worksSELECT * FROM (SELECT P.vehicleref, P.capid, P.manufacturer, P.model, P.derivative, P.additionalfreetext, P.cvehicle_shortmodtext, NMF.term, NMF.milespa, NMF.maintained, NMF.ch, p.source, ROW_NUMBER() OVER (PARTITION BY P.VehicleRef ORDER BY NMF.ch) AS MinCHFROM (SELECT * FROM vwAllMatrixWithLombardAndShortModelWHERE source <> 'web' AND vehicleref IN(SELECT vehicleref FROM tblDealOfTheDay)) P INNER JOINdbPubMatrix..tblNewMatrixFigures NMF ON P.VehicleRef = NMF.[VehicleRef]) Q WHERE MinCH = 1
I need to add thisWHERE nmf.ch > 0Where does that clause need to go, i've tried various places all without success. Thanks.