Q&A for professional and enthusiast programmers
SELECT TOP 15 Id, Score, FavoriteCount as Votes, CommentCount as Answers, Viewcount as Views, title FROM Posts ORDER BY Score DESC; SELECT TOP 10 * FROM Posts ORDER BY Score; SELECT * FROM Comments WHERE datediff(day, CreationDate, '10/18/2013') = 0; SELECT DISTINCT UserDisplayName, UserId FROM Comments WHERE UserDisplayName <> NULL OR UserDisplayName <> '' ORDER BY UserDisplayName; SELECT DISTINCT UserDisplayName, UserId FROM Comments WHERE UserDisplayName <> NULL OR UserDisplayName <> '' AND UserId > 0 ORDER BY UserDisplayName; SELECT DISTINCT UserId, UserDisplayName FROM Comments WHERE UserId IS NULL AND UserDisplayName = NULL OR UserDisplayName = ''; SELECT Id, DisplayName, Location FROM Users WHERE Location = 'NY' OR Location LIKE '%New York%';