Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
18
Answers
Getting same average values excute the stored procedure
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Sivakumar
9y
600
1
Reply
Hi,
This is My Stored Procedure :
GO
/****** Object: StoredProcedure [dbo].[uspGetVote] Script Date: 9/3/2015 12:40:42 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[uspGetVote](@TeamID INT)
AS
BEGIN
select avg(VoteValue) as [AverageVoteValue] from Vote where datediff(day,getdate(),LastModifiedDateTime) <= 7 Group By TeamID order by AverageVoteValue
END
and i execute this procedure but get a same results for all teamid's
please give a correct query for that
Post
Reset
Cancel
Answers (
18
)
Next Recommended Forum
how get data from table
sql query Negative values assign 0 in case using