Q&A for Ubuntu users and developers
SELECT TOP ##TopCount:INT?100## -- optional 100 ROW_NUMBER() OVER (ORDER BY p.CreationDate ASC) AS 'ID', p.Id AS [Post Link], --p.PostTypeId AS 'TID', IIF(a.ParentId <> a.Id, a.Title, p.Title) AS 'Title', IIF(p.ParentId IS NULL, a.Id, p.Id) AS 'PID', IIF(p.ParentId IS NULL, a.PostTypeId, p.PostTypeId) AS 'PTID', p.OwnerUserId AS 'UID', p.CreationDate AS 'Created' FROM Posts AS p JOIN Posts AS a ON p.Id = a.Parentid WHERE p.PostTypeId = 1 AND YEAR(p.CreationDate) >= 2008 AND YEAR(p.CreationDate) <= 2012 AND p.Tags LIKE '%<vba>%' ORDER BY p.CreationDate ASC