इसे आजमाएं:
SELECT id, name,
(SELECT COUNT(name)
FROM markers im
WHERE state like 'OR'
GROUP BY name
HAVING im.name=m.name) as count
FROM markers m
WHERE state like 'OR'
GROUP BY name, id
इसे आजमाएं:
SELECT id, name,
(SELECT COUNT(name)
FROM markers im
WHERE state like 'OR'
GROUP BY name
HAVING im.name=m.name) as count
FROM markers m
WHERE state like 'OR'
GROUP BY name, id