select top 1 * from posttypes; /* select row_number() ove...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

select top 1 * from posttypes;
/*
select row_number() over
(PARTITION BY OwnerUserId order by posts.creationDate) as us from Posts p
    join users u on u.id = p.OwnerUserId and p.PostTypeId = 1
    where u.location like '%Russia%' and year(p.creationDate) = 2016 and p.title like '%SQL%' 
    group by u.id
*/
/*
select t1.* from (select * from posts p
    join users u on u.id = p.OwnerUserId and p.PostTypeId = 1
    where u.location like '%Russia%' and year(p.creationDate) = 2016 and p.title like '%SQL%' 
    group by posts.OwnerUserId) as t1, lateral (select top 1 * from posts where t1.id = posts.id order by creationDate

/*
select count(a.id) from
    (select users.id from users 
    join posts p on users.id = p.OwnerUserId and PostTypeId = 1
    group by users.id) a
    left outer join posts on a.id = posts.OwnerUserId and PostTypeId = 2
    where posts.id is NULL

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results