select DISTINCT(cctv_id), cctv.[name] from points_cctv left join cctv on points_cctv.[cctv_id] = cctv.[id]
I want to count number of records in points_cctv where points_cctv.[cctv_id] = cctv.[id] and show this as additional column in the above query. When I insert count(points_cctv.[cctv_id]) it will give me just one row.
1 Answer