-
Notifications
You must be signed in to change notification settings - Fork 1
/
Queries
50 lines (44 loc) · 1 KB
/
Queries
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Queries
Posts
Select TOP 5000
Posts.OwnerUserId
from Posts
Inner join PostTags
on Posts.Id = PostTags.PostId
Inner join Tags
On PostTags.TagId = Tags.id
Where score >= 0
And ClosedDate is null
And Tags.TagName='ios'
Order by CreationDate Desc
Users
Select Users.Id, Reputation, DisplayName
From Users
Inner Join (
Select TOP 5000
Posts.OwnerUserId
from Posts
Inner join PostTags
on Posts.Id = PostTags.PostId
Inner join Tags
On PostTags.TagId = Tags.id
Where score >= 0
And ClosedDate is null
And Tags.TagName='ios'
Order by CreationDate Desc ) As Posts On Posts.OwnerUserId = Users.Id
Tags
Select Distinct Tags.Id, Tags.TagName
From Tags
Inner Join PostTags on PostTags.TagId = Tags.Id
Inner Join (
Select TOP 5000
Posts.Id
from Posts
Inner join PostTags
on Posts.Id = PostTags.PostId
Inner join Tags
On PostTags.TagId = Tags.id
Where score >= 0
And ClosedDate is null
And Tags.TagName='ios'
Order by CreationDate Desc ) As Posts On Posts.Id = PostTags.PostId