I have a statement with 5 inner joins, and now I need to add the following to be returned as a column
select count(*) from wlt_tblAlerts_CommentsAndDismissed where ifkAlertCapturedID = [ifkAlertCapturedID] and vComment is not null) as NoOfcomments
I'm concerned about performance
Would it be better to use SUM OF or something else?
All the above does is return a count of how many comments there are for a certain ID