Hi this is my tables structure :
and this is my stored procedure :
GO
ALTER PROCEDURE [dbo].[uspGetVote](@TeamID INT,@CardID INT)
AS
BEGIN
select cast(avg(VoteValue) as float) as [AverageVoteValue] from Vote where datediff(day,getdate(),LastModifiedDateTime) <= 7 and TeamID = @TeamID and CardID=@CardID Group By TeamID,CardID order by AverageVoteValue
END
i want to join VoteComment Table also please give me a query for that
thank you