Q&A for people studying math at any level and professionals in related fields
SELECT TOP ##num## Id As [Post Link], OwnerUserId AS [User Link], CreationDate, LastActivityDate, Score, ViewCount, Body FROM Posts WHERE (Body LIKE '%##text##%') AND NOT(Body LIKE '%newcommand%') --we want to catch both \newcommand and \renewcommand AND NOT(Body LIKE '%\DeclareMathOperator%') AND NOT(Body LIKE '%\def%') ORDER BY CreationDate DESC