View difference between Paste ID: 6gtuEipk and 7UeaKEgs
SHOW: | | - or go back to the newest paste.
1
{SELECT 
2-
[UnionAll1].[movie_ID] AS [C1], 
2+
UnionAll1.movie_ID AS C1, 
3-
[UnionAll1].[movie_ID1] AS [C2], 
3+
UnionAll1.movie_ID1 AS C2, 
4-
[UnionAll1].[short_title] AS [C3], 
4+
UnionAll1.short_title AS C3, 
5-
[UnionAll1].[year] AS [C4], 
5+
UnionAll1.year AS C4, 
6-
[UnionAll1].[runtime] AS [C5], 
6+
UnionAll1.runtime AS C5, 
7-
[UnionAll1].[avg_rating] AS [C6], 
7+
UnionAll1.avg_rating AS C6, 
8-
[UnionAll1].[tv_rating] AS [C7], 
8+
UnionAll1.tv_rating AS C7, 
9-
[UnionAll1].[web_page] AS [C8], 
9+
UnionAll1.web_page AS C8, 
10-
[UnionAll1].[current_season] AS [C9], 
10+
UnionAll1.current_season AS C9, 
11-
[UnionAll1].[is_movie] AS [C10], 
11+
UnionAll1.is_movie AS C10, 
12-
[UnionAll1].[maturity_rating] AS [C11], 
12+
UnionAll1.maturity_rating AS C11, 
13-
[UnionAll1].[boxart_ID] AS [C12], 
13+
UnionAll1.boxart_ID AS C12, 
14-
[UnionAll1].[movie_ID2] AS [C13], 
14+
UnionAll1.movie_ID2 AS C13, 
15-
[UnionAll1].[boxart_38] AS [C14], 
15+
UnionAll1.boxart_38 AS C14, 
16-
[UnionAll1].[boxart_64] AS [C15], 
16+
UnionAll1.boxart_64 AS C15, 
17-
[UnionAll1].[boxart_110] AS [C16], 
17+
UnionAll1.boxart_110 AS C16, 
18-
[UnionAll1].[boxart_124] AS [C17], 
18+
UnionAll1.boxart_124 AS C17, 
19-
[UnionAll1].[boxart_150] AS [C18], 
19+
UnionAll1.boxart_150 AS C18, 
20-
[UnionAll1].[boxart_166] AS [C19], 
20+
UnionAll1.boxart_166 AS C19, 
21-
[UnionAll1].[boxart_88] AS [C20], 
21+
UnionAll1.boxart_88 AS C20, 
22-
[UnionAll1].[boxart_197] AS [C21], 
22+
UnionAll1.boxart_197 AS C21, 
23-
[UnionAll1].[boxart_176] AS [C22], 
23+
UnionAll1.boxart_176 AS C22, 
24-
[UnionAll1].[boxart_284] AS [C23], 
24+
UnionAll1.boxart_284 AS C23, 
25-
[UnionAll1].[boxart_210] AS [C24], 
25+
UnionAll1.boxart_210 AS C24, 
26-
[UnionAll1].[movie_ID3] AS [C25], 
26+
UnionAll1.movie_ID3 AS C25, 
27-
[UnionAll1].[movie_ID4] AS [C26], 
27+
UnionAll1.movie_ID4 AS C26, 
28-
[UnionAll1].[ombd_ID] AS [C27], 
28+
UnionAll1.ombd_ID AS C27, 
29-
[UnionAll1].[movie_ID5] AS [C28], 
29+
UnionAll1.movie_ID5 AS C28, 
30-
[UnionAll1].[title] AS [C29], 
30+
UnionAll1.title AS C29, 
31-
[UnionAll1].[year1] AS [C30], 
31+
UnionAll1.year1 AS C30, 
32-
[UnionAll1].[i_Rating] AS [C31], 
32+
UnionAll1.i_Rating AS C31, 
33-
[UnionAll1].[i_Votes] AS [C32], 
33+
UnionAll1.i_Votes AS C32, 
34-
[UnionAll1].[i_ID] AS [C33], 
34+
UnionAll1.i_ID AS C33, 
35-
[UnionAll1].[t_Meter] AS [C34], 
35+
UnionAll1.t_Meter AS C34, 
36-
[UnionAll1].[t_Image] AS [C35], 
36+
UnionAll1.t_Image AS C35, 
37-
[UnionAll1].[t_Rating] AS [C36], 
37+
UnionAll1.t_Rating AS C36, 
38-
[UnionAll1].[t_Reviews] AS [C37], 
38+
UnionAll1.t_Reviews AS C37, 
39-
[UnionAll1].[t_Fresh] AS [C38], 
39+
UnionAll1.t_Fresh AS C38, 
40-
[UnionAll1].[t_Rotten] AS [C39], 
40+
UnionAll1.t_Rotten AS C39, 
41-
[UnionAll1].[t_Consensus] AS [C40], 
41+
UnionAll1.t_Consensus AS C40, 
42-
[UnionAll1].[t_UserMeter] AS [C41], 
42+
UnionAll1.t_UserMeter AS C41, 
43-
[UnionAll1].[t_UserRating] AS [C42], 
43+
UnionAll1.t_UserRating AS C42, 
44-
[UnionAll1].[t_UserReviews] AS [C43], 
44+
UnionAll1.t_UserReviews AS C43, 
45-
[UnionAll1].[C1] AS [C44], 
45+
UnionAll1.C1 AS C44, 
46-
[UnionAll1].[genre_string] AS [C45], 
46+
UnionAll1.genre_string AS C45, 
47-
[UnionAll1].[C2] AS [C46]
47+
UnionAll1.C2 AS C46
48
FROM  (SELECT 
49-
	CASE WHEN ([Join5].[movie_ID] IS NULL) THEN CAST(NULL AS int) ELSE 1 END AS [C1], 
49+
	CASE WHEN (Join5.movie_ID IS NULL) THEN CAST(NULL AS int) ELSE 1 END AS C1, 
50-
	[Extent1].[movie_ID] AS [movie_ID], 
50+
	Extent1.movie_ID AS movie_ID, 
51-
	[Extent1].[movie_ID] AS [movie_ID1], 
51+
	Extent1.movie_ID AS movie_ID1, 
52-
	[Extent1].[short_title] AS [short_title], 
52+
	Extent1.short_title AS short_title, 
53-
	[Extent1].[year] AS [year], 
53+
	Extent1.year AS year, 
54-
	[Extent1].[runtime] AS [runtime], 
54+
	Extent1.runtime AS runtime, 
55-
	[Extent1].[avg_rating] AS [avg_rating], 
55+
	Extent1.avg_rating AS avg_rating, 
56-
	[Extent1].[tv_rating] AS [tv_rating], 
56+
	Extent1.tv_rating AS tv_rating, 
57-
	[Extent1].[web_page] AS [web_page], 
57+
	Extent1.web_page AS web_page, 
58-
	[Extent1].[current_season] AS [current_season], 
58+
	Extent1.current_season AS current_season, 
59-
	[Extent1].[is_movie] AS [is_movie], 
59+
	Extent1.is_movie AS is_movie, 
60-
	[Extent1].[maturity_rating] AS [maturity_rating], 
60+
	Extent1.maturity_rating AS maturity_rating, 
61-
	[Extent3].[boxart_ID] AS [boxart_ID], 
61+
	Extent3.boxart_ID AS boxart_ID, 
62-
	[Extent3].[movie_ID] AS [movie_ID2], 
62+
	Extent3.movie_ID AS movie_ID2, 
63-
	[Extent3].[boxart_38] AS [boxart_38], 
63+
	Extent3.boxart_38 AS boxart_38, 
64-
	[Extent3].[boxart_64] AS [boxart_64], 
64+
	Extent3.boxart_64 AS boxart_64, 
65-
	[Extent3].[boxart_110] AS [boxart_110], 
65+
	Extent3.boxart_110 AS boxart_110, 
66-
	[Extent3].[boxart_124] AS [boxart_124], 
66+
	Extent3.boxart_124 AS boxart_124, 
67-
	[Extent3].[boxart_150] AS [boxart_150], 
67+
	Extent3.boxart_150 AS boxart_150, 
68-
	[Extent3].[boxart_166] AS [boxart_166], 
68+
	Extent3.boxart_166 AS boxart_166, 
69-
	[Extent3].[boxart_88] AS [boxart_88], 
69+
	Extent3.boxart_88 AS boxart_88, 
70-
	[Extent3].[boxart_197] AS [boxart_197], 
70+
	Extent3.boxart_197 AS boxart_197, 
71-
	[Extent3].[boxart_176] AS [boxart_176], 
71+
	Extent3.boxart_176 AS boxart_176, 
72-
	[Extent3].[boxart_284] AS [boxart_284], 
72+
	Extent3.boxart_284 AS boxart_284, 
73-
	[Extent3].[boxart_210] AS [boxart_210], 
73+
	Extent3.boxart_210 AS boxart_210, 
74-
	[Distinct1].[movie_ID] AS [movie_ID3], 
74+
	Distinct1.movie_ID AS movie_ID3, 
75-
	[Distinct1].[movie_ID] AS [movie_ID4], 
75+
	Distinct1.movie_ID AS movie_ID4, 
76-
	[Extent2].[ombd_ID] AS [ombd_ID], 
76+
	Extent2.ombd_ID AS ombd_ID, 
77-
	[Extent2].[movie_ID] AS [movie_ID5], 
77+
	Extent2.movie_ID AS movie_ID5, 
78-
	[Extent2].[title] AS [title], 
78+
	Extent2.title AS title, 
79-
	[Extent2].[year] AS [year1], 
79+
	Extent2.year AS year1, 
80-
	[Extent2].[i_Rating] AS [i_Rating], 
80+
	Extent2.i_Rating AS i_Rating, 
81-
	[Extent2].[i_Votes] AS [i_Votes], 
81+
	Extent2.i_Votes AS i_Votes, 
82-
	[Extent2].[i_ID] AS [i_ID], 
82+
	Extent2.i_ID AS i_ID, 
83-
	[Extent2].[t_Meter] AS [t_Meter], 
83+
	Extent2.t_Meter AS t_Meter, 
84-
	[Extent2].[t_Image] AS [t_Image], 
84+
	Extent2.t_Image AS t_Image, 
85-
	[Extent2].[t_Rating] AS [t_Rating], 
85+
	Extent2.t_Rating AS t_Rating, 
86-
	[Extent2].[t_Reviews] AS [t_Reviews], 
86+
	Extent2.t_Reviews AS t_Reviews, 
87-
	[Extent2].[t_Fresh] AS [t_Fresh], 
87+
	Extent2.t_Fresh AS t_Fresh, 
88-
	[Extent2].[t_Rotten] AS [t_Rotten], 
88+
	Extent2.t_Rotten AS t_Rotten, 
89-
	[Extent2].[t_Consensus] AS [t_Consensus], 
89+
	Extent2.t_Consensus AS t_Consensus, 
90-
	[Extent2].[t_UserMeter] AS [t_UserMeter], 
90+
	Extent2.t_UserMeter AS t_UserMeter, 
91-
	[Extent2].[t_UserRating] AS [t_UserRating], 
91+
	Extent2.t_UserRating AS t_UserRating, 
92-
	[Extent2].[t_UserReviews] AS [t_UserReviews], 
92+
	Extent2.t_UserReviews AS t_UserReviews, 
93-
	[Join5].[genre_string] AS [genre_string], 
93+
	Join5.genre_string AS genre_string, 
94-
	CAST(NULL AS int) AS [C2]
94+
	CAST(NULL AS int) AS C2
95-
	FROM     [dbo].[Movies] AS [Extent1]
95+
	FROM     dbo.Movies AS Extent1
96-
	LEFT OUTER JOIN [dbo].[OmdbEntries] AS [Extent2] ON [Extent1].[movie_ID] = [Extent2].[movie_ID]
96+
	LEFT OUTER JOIN dbo.OmdbEntries AS Extent2 ON Extent1.movie_ID = Extent2.movie_ID
97-
	INNER JOIN [dbo].[BoxArts] AS [Extent3] ON [Extent1].[movie_ID] = [Extent3].[movie_ID]
97+
	INNER JOIN dbo.BoxArts AS Extent3 ON Extent1.movie_ID = Extent3.movie_ID
98
	INNER JOIN  (SELECT DISTINCT 
99-
		[Extent4].[movie_ID] AS [movie_ID]
99+
		Extent4.movie_ID AS movie_ID
100-
		FROM  [dbo].[MovieToGenres] AS [Extent4]
100+
		FROM  dbo.MovieToGenres AS Extent4
101-
		INNER JOIN [dbo].[Genres] AS [Extent5] ON [Extent4].[genre_ID] = [Extent5].[genre_ID] ) AS [Distinct1] ON [Distinct1].[movie_ID] = [Extent1].[movie_ID]
101+
		INNER JOIN dbo.Genres AS Extent5 ON Extent4.genre_ID = Extent5.genre_ID ) AS Distinct1 ON Distinct1.movie_ID = Extent1.movie_ID
102-
	LEFT OUTER JOIN  (SELECT [Extent6].[movie_ID] AS [movie_ID], [Extent7].[genre_string] AS [genre_string]
102+
	LEFT OUTER JOIN  (SELECT Extent6.movie_ID AS movie_ID, Extent7.genre_string AS genre_string
103-
		FROM  [dbo].[MovieToGenres] AS [Extent6]
103+
		FROM  dbo.MovieToGenres AS Extent6
104-
		INNER JOIN [dbo].[Genres] AS [Extent7] ON [Extent6].[genre_ID] = [Extent7].[genre_ID] ) AS [Join5] ON [Distinct1].[movie_ID] = [Join5].[movie_ID]
104+
		INNER JOIN dbo.Genres AS Extent7 ON Extent6.genre_ID = Extent7.genre_ID ) AS Join5 ON Distinct1.movie_ID = Join5.movie_ID
105
UNION ALL
106
	SELECT 
107-
	2 AS [C1], 
107+
	2 AS C1, 
108-
	[Extent8].[movie_ID] AS [movie_ID], 
108+
	Extent8.movie_ID AS movie_ID, 
109-
	[Extent8].[movie_ID] AS [movie_ID1], 
109+
	Extent8.movie_ID AS movie_ID1, 
110-
	[Extent8].[short_title] AS [short_title], 
110+
	Extent8.short_title AS short_title, 
111-
	[Extent8].[year] AS [year], 
111+
	Extent8.year AS year, 
112-
	[Extent8].[runtime] AS [runtime], 
112+
	Extent8.runtime AS runtime, 
113-
	[Extent8].[avg_rating] AS [avg_rating], 
113+
	Extent8.avg_rating AS avg_rating, 
114-
	[Extent8].[tv_rating] AS [tv_rating], 
114+
	Extent8.tv_rating AS tv_rating, 
115-
	[Extent8].[web_page] AS [web_page], 
115+
	Extent8.web_page AS web_page, 
116-
	[Extent8].[current_season] AS [current_season], 
116+
	Extent8.current_season AS current_season, 
117-
	[Extent8].[is_movie] AS [is_movie], 
117+
	Extent8.is_movie AS is_movie, 
118-
	[Extent8].[maturity_rating] AS [maturity_rating], 
118+
	Extent8.maturity_rating AS maturity_rating, 
119-
	[Extent10].[boxart_ID] AS [boxart_ID], 
119+
	Extent10.boxart_ID AS boxart_ID, 
120-
	[Extent10].[movie_ID] AS [movie_ID2], 
120+
	Extent10.movie_ID AS movie_ID2, 
121-
	[Extent10].[boxart_38] AS [boxart_38], 
121+
	Extent10.boxart_38 AS boxart_38, 
122-
	[Extent10].[boxart_64] AS [boxart_64], 
122+
	Extent10.boxart_64 AS boxart_64, 
123-
	[Extent10].[boxart_110] AS [boxart_110], 
123+
	Extent10.boxart_110 AS boxart_110, 
124-
	[Extent10].[boxart_124] AS [boxart_124], 
124+
	Extent10.boxart_124 AS boxart_124, 
125-
	[Extent10].[boxart_150] AS [boxart_150], 
125+
	Extent10.boxart_150 AS boxart_150, 
126-
	[Extent10].[boxart_166] AS [boxart_166], 
126+
	Extent10.boxart_166 AS boxart_166, 
127-
	[Extent10].[boxart_88] AS [boxart_88], 
127+
	Extent10.boxart_88 AS boxart_88, 
128-
	[Extent10].[boxart_197] AS [boxart_197], 
128+
	Extent10.boxart_197 AS boxart_197, 
129-
	[Extent10].[boxart_176] AS [boxart_176], 
129+
	Extent10.boxart_176 AS boxart_176, 
130-
	[Extent10].[boxart_284] AS [boxart_284], 
130+
	Extent10.boxart_284 AS boxart_284, 
131-
	[Extent10].[boxart_210] AS [boxart_210], 
131+
	Extent10.boxart_210 AS boxart_210, 
132-
	[Distinct2].[movie_ID] AS [movie_ID3], 
132+
	Distinct2.movie_ID AS movie_ID3, 
133-
	[Distinct2].[movie_ID] AS [movie_ID4], 
133+
	Distinct2.movie_ID AS movie_ID4, 
134-
	[Extent9].[ombd_ID] AS [ombd_ID], 
134+
	Extent9.ombd_ID AS ombd_ID, 
135-
	[Extent9].[movie_ID] AS [movie_ID5], 
135+
	Extent9.movie_ID AS movie_ID5, 
136-
	[Extent9].[title] AS [title], 
136+
	Extent9.title AS title, 
137-
	[Extent9].[year] AS [year1], 
137+
	Extent9.year AS year1, 
138-
	[Extent9].[i_Rating] AS [i_Rating], 
138+
	Extent9.i_Rating AS i_Rating, 
139-
	[Extent9].[i_Votes] AS [i_Votes], 
139+
	Extent9.i_Votes AS i_Votes, 
140-
	[Extent9].[i_ID] AS [i_ID], 
140+
	Extent9.i_ID AS i_ID, 
141-
	[Extent9].[t_Meter] AS [t_Meter], 
141+
	Extent9.t_Meter AS t_Meter, 
142-
	[Extent9].[t_Image] AS [t_Image], 
142+
	Extent9.t_Image AS t_Image, 
143-
	[Extent9].[t_Rating] AS [t_Rating], 
143+
	Extent9.t_Rating AS t_Rating, 
144-
	[Extent9].[t_Reviews] AS [t_Reviews], 
144+
	Extent9.t_Reviews AS t_Reviews, 
145-
	[Extent9].[t_Fresh] AS [t_Fresh], 
145+
	Extent9.t_Fresh AS t_Fresh, 
146-
	[Extent9].[t_Rotten] AS [t_Rotten], 
146+
	Extent9.t_Rotten AS t_Rotten, 
147-
	[Extent9].[t_Consensus] AS [t_Consensus], 
147+
	Extent9.t_Consensus AS t_Consensus, 
148-
	[Extent9].[t_UserMeter] AS [t_UserMeter], 
148+
	Extent9.t_UserMeter AS t_UserMeter, 
149-
	[Extent9].[t_UserRating] AS [t_UserRating], 
149+
	Extent9.t_UserRating AS t_UserRating, 
150-
	[Extent9].[t_UserReviews] AS [t_UserReviews], 
150+
	Extent9.t_UserReviews AS t_UserReviews, 
151-
	CAST(NULL AS varchar(1)) AS [C2], 
151+
	CAST(NULL AS varchar(1)) AS C2, 
152-
	[Extent13].[genre_ID] AS [genre_ID]
152+
	Extent13.genre_ID AS genre_ID
153-
	FROM     [dbo].[Movies] AS [Extent8]
153+
	FROM     dbo.Movies AS Extent8
154-
	LEFT OUTER JOIN [dbo].[OmdbEntries] AS [Extent9] ON [Extent8].[movie_ID] = [Extent9].[movie_ID]
154+
	LEFT OUTER JOIN dbo.OmdbEntries AS Extent9 ON Extent8.movie_ID = Extent9.movie_ID
155-
	INNER JOIN [dbo].[BoxArts] AS [Extent10] ON [Extent8].[movie_ID] = [Extent10].[movie_ID]
155+
	INNER JOIN dbo.BoxArts AS Extent10 ON Extent8.movie_ID = Extent10.movie_ID
156
	INNER JOIN  (SELECT DISTINCT 
157-
		[Extent11].[movie_ID] AS [movie_ID]
157+
		Extent11.movie_ID AS movie_ID
158-
		FROM  [dbo].[MovieToGenres] AS [Extent11]
158+
		FROM  dbo.MovieToGenres AS Extent11
159-
		INNER JOIN [dbo].[Genres] AS [Extent12] ON [Extent11].[genre_ID] = [Extent12].[genre_ID] ) AS [Distinct2] ON [Distinct2].[movie_ID] = [Extent8].[movie_ID]
159+
		INNER JOIN dbo.Genres AS Extent12 ON Extent11.genre_ID = Extent12.genre_ID ) AS Distinct2 ON Distinct2.movie_ID = Extent8.movie_ID
160-
	INNER JOIN [dbo].[MovieToGenres] AS [Extent13] ON [Extent13].[movie_ID] = [Extent8].[movie_ID]) AS [UnionAll1]
160+
	INNER JOIN dbo.MovieToGenres AS Extent13 ON Extent13.movie_ID = Extent8.movie_ID) AS UnionAll1
161-
ORDER BY [UnionAll1].[movie_ID1] ASC, [UnionAll1].[boxart_ID] ASC, [UnionAll1].[movie_ID4] ASC, [UnionAll1].[ombd_ID] ASC, [UnionAll1].[C1] ASC}
161+
ORDER BY UnionAll1.movie_ID1 ASC, UnionAll1.boxart_ID ASC, UnionAll1.movie_ID4 ASC, UnionAll1.ombd_ID ASC, UnionAll1.C1 ASC}