Q&A for network engineers
select q.OwnerUserId, a.OwnerUserId, u.Location as answerer_location, q.Id as questionId, a.Id as answerId, q.AcceptedAnswerId, q.CreationDate, a.CreationDate, q.AnswerCount, q.score, a.score, a.*
from posts as q join posts as a on q.Id = a.ParentId join users as u on a.OwnerUserId = u.Id
where q.CreationDate < '2021-02-01 00:00:00'
and q.CreationDate >= '2021-01-01 00:00:00'
and q.PostTypeId = 1
and a.PostTypeId = 2
and q.OwnerUserId IS NOT NULL
and a.OwnerUserId IS NOT NULL
and q.AcceptedAnswerId IS NOT NULL
and a.Id = q.AcceptedAnswerId
and q.Tags LIKE '%python%'
and u.Location LIKE '%Tehran%'