I have this query:
SELECT p.[PostingID]
,[EmployerID]
,[JobTitle]
,pin.[IndustryID]
FROM [Posting] p
INNER JOIN [City] c
ON p.CityID = c.CityID
LEFT OUTER JOIN PostingIndustry pin
ON p.PostingID = pin.PostingID
WHERE (c.CityID = @CityId OR @CityId IS NULL)
AND (p.StateProvinceID = @StateProvinceId OR @StateProvinceId IS NULL)
AND (pin.IndustryID = @IndustryId OR @IndustryId IS NULL)
AND
(
(p.[Description] LIKE '%' + @Keyword + '%' OR @Keyword IS NULL)
OR (p.[JobTitle] LIKE '%' + @Keyword + '%' OR @Keyword IS NULL)
)
AND p.StreetAddress IS NOT NULL
AND p.ShowOnMap = 1
Which returns results for all the pin.[IndustryID] if IndustryId is not selected or if all the industries are selected. If only one industry is selected I am getting one result which is good, but when one posting is included in multiple industries then I am getting multiple results as on the image shown below:

So for example when that's happening I want to get only one result for that posting id otherwise I am getting multiple results for one google map marker per the image below:

Is there a way how I can optimize the query above to do what I need?