I am trying to modify the below query that works ok, to add another column that counts the number of site matches in the table pagerdetails based on the site value in the row result within the query below where the date of response (pagerresponse.date) => pagerdetails.activationdate SELECT "PagerDetails"."BleepNumber", "PagerResponse"."username", "PagerResponse"."userid","PagerResponse"."PCName", "PagerResponse"."Date", "PagerDetails"."Group", "PagerDetails"."Site", "PagerDetails"."ActivationDate"FROM "EmergencyPager"."dbo"."PagerDetails" "PagerDetails" INNER JOIN "EmergencyPager"."dbo"."PagerResponse" "PagerResponse" ON "PagerDetails"."ID"="PagerResponse"."PagerID"
Basically i want to add a column based on a query using the results from the above queryHope ive explained it right and thanks in advance as im totaly lost!