Sivakumar

Sivakumar

  • NA
  • 551
  • 210k

how to join multiple tables using stored procedure

Sep 3 2015 6:44 AM
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

Answers (3)