Group By on a calculated field using T-SQL -
i have following code:
select distinct m.property_id, m.property_size, count(f.request_id) wos, round(cast(m.[property_size] float(10)) / cast((f.[request_id] * 1000) float(5)),2) per_1k_sqft t1 m, t2 f m.property_id = f.property_id , datepart(year,request_date) = '2015' , datepart(month, f.request_date) = '12' group m.property_id, m.property_size, round(cast(m.[property_size] float(10)) / cast((f.[request_id] * 1000) float(5)),2) order count(f.request_id) desc
my last column, per_sq_ft zeros. why isn't populating result of calculation?
Comments
Post a Comment