this could be parameterized to take in a user name
Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language
-- Longest Jeff Atwood post -- this could be parameterized to take in a user name ;with cte as ( SELECT p.id [Post Link], Row_Number() over (order by datalength(p.body) desc) rn FROM posts p inner join users u ON p.owneruserId = u.id WHERE u.displayname = 'Jeff Atwood' ) select * from cte where rn = 1