title

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT 
P.Id,P.Tags, P.CreationDate,U.Location, P.Body

 
FROM Posts as P
JOIN 
Users as U ON P.OwnerUserId =U.Id

WHERE
P.PostTypeId=1 AND P.Tags LIKE '%python%' AND P.CreationDate
BETWEEN'04-01-2017' and '04-01-2018'
AND
(U.Location LIKE '%UK%' 
OR U.Location LIKE '%Netherlands%'
OR U.Location LIKE '%Singapore%'
OR U.Location LIKE '%Switzerland%'
OR U.Location LIKE '%Poland%'
OR U.Location LIKE '%Italy%'
OR U.Location LIKE '%Spain%'
OR U.Location LIKE '%Sweden%'
OR U.Location LIKE '%Belgium%'
OR U.Location LIKE '%Deutschland%'
OR U.Location LIKE '%Europe%')
UNION 
SELECT 
P.Id,P.Tags, P.CreationDate,U.Location, P.Body

FROM Posts as P
JOIN 
Users as U ON P.OwnerUserId =U.Id

WHERE P.ParentId
IN (
SELECT 
P.Id
 
FROM Posts as P
JOIN 
Users as U ON P.OwnerUserId =U.Id

WHERE
P.PostTypeId=1 AND P.Tags LIKE '%python%' AND P.CreationDate
BETWEEN'04-01-2017' and '04-01-2018'
AND
(U.Location LIKE '%UK%' 
OR U.Location LIKE '%Netherlands%'
OR U.Location LIKE '%Singapore%'
OR U.Location LIKE '%Switzerland%'
OR U.Location LIKE '%Poland%'
OR U.Location LIKE '%Italy%'
OR U.Location LIKE '%Spain%'
OR U.Location LIKE '%Sweden%'
OR U.Location LIKE '%Belgium%'
OR U.Location LIKE '%Deutschland%'
OR U.Location LIKE '%Europe%'))

Enter Parameters

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