StackOverflowDocumentation
.dbo
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
usp_Q36660
Parameters
Name
Type
Mode
@Useless
int
IN
Definition
CREATE PROC [dbo].[usp_Q36660] @Useless INT AS BEGIN /* Source: http://data.stackexchange.com/stackoverflow/query/36660/most-down-voted-questions */ select top 20 count(v.PostId) as 'Vote count', v.PostId AS [Post Link],p.Body from Votes v inner join Posts p on p.Id=v.PostId where PostTypeId = 1 and v.VoteTypeId=3 group by v.PostId,p.Body order by 'Vote count' desc END