Skip to content

Instantly share code, notes, and snippets.

@jonedmiston
Created June 16, 2017 05:46
Show Gist options
  • Save jonedmiston/ca5945af0e704b371d74bb966bf55e63 to your computer and use it in GitHub Desktop.
Save jonedmiston/ca5945af0e704b371d74bb966bf55e63 to your computer and use it in GitHub Desktop.
Get's Slack Points
SELECT TOP (1000)
dv.[Value]
,[Description]
,CONVERT(INT, av.[ValueAsNumeric]) as [Points]
FROM [RockRMS-Spark].[dbo].[DefinedValue] dv
INNER JOIN [AttributeValue] av ON av.[EntityId] = dv.[Id] AND av.[AttributeId] = 3599
WHERE [DefinedTypeId] = 74
ORDER BY [Points] desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment