UPDATE Posts SET HasNotesGathered = 0 WHERE (BlogName, PostID) IN ( SELECT p.BlogName, p.PostID FROM Posts p WHERE p.HasNotesGathered = 1 AND P.notesGatheredDatetime < 1774294520 AND EXISTS ( SELECT 1 FROM Notes n WHERE n.PostID = p.PostID AND n.RootBlogName = p.BlogName --AND n.Type NOT IN ('reblog', 'reply') ) ORDER BY P.PostDate ASC --LIMIT 500 );select * from Blogs --update blogs set HasBeenOutput = 1 where HasBeenOutput = 0 AND blogname in ( 'teaberrybee', 'reddevilgoddesstoo', 'waywardog13', 'wzjustbrowsing-blog', 'lewerta', 'nudenymph', 'caylachief' )select P.slug, N.replyText, n.RootBlogName, n.PostID, NoteBlogName || '.tumblr.com' as NoteBlogName, DatetimeCrawled, TimeStamp, type, n.RootBlogName || '.tumblr.com/post/' || n.postid, datetime(timestamp, 'unixepoch') from Notes N inner join Posts P on p.PostID = n.PostID where DatetimeCrawled > '2026-08-07 11:47:22' and type like 'r%' and P.IsActive = 1 order by n.DatetimeCrawledSELECT distinct '''' || blogname || ''',', blogs.* , blogname || '.tumblr.com' FROM Blogs inner JOIN Notes on notes.noteBlogName = blogs.BlogName WHERE HasBeenOutput = 0 and type = 'reblog' order by Notes.Type desc, DateAdded desc LIMIT 100;WITH ReplyCounts AS ( SELECT NoteBlogName, COUNT(DISTINCT replyText) AS DistinctReplyCount FROM Notes where replyText <> '.' GROUP BY NoteBlogName ) SELECT n.RootBlogName || '.tumblr.com/post/' || n.PostID AS PostURL, postid, n.NoteBlogName, n.replyText, c.DistinctReplyCount FROM Notes n JOIN ReplyCounts c ON n.NoteBlogName = c.NoteBlogName where replyText <> '.' and type <> 'reply' --AND N.NoteBlogName NOT IN ( 'roadblocker21', 'thesaddemon666', 'edwardabbeyhoffman', 'tattedsoldier20', 'zomb-eh', 'animalistic13', 'indken', 'maccloud1592', --'moss-wizard', 'supertrucker12682', 'exploringthrupics', 'padeyepete' ) order by c.DistinctReplyCount desc, n.NoteBlogName, n.DateModified desc, replyText, RootBlogName, PostIDWITH PostsWithCount AS ( SELECT P.BlogName, P.PostID, 1925013599 AS LatestNoteTimestamp, P.NotesGatheredDateTime, COUNT(P.PostID) OVER(PARTITION BY P.BlogName) AS CNT, P.HasNotesGathered, P.NotFound, P.PostDate FROM Posts P WHERE COALESCE(P.IsActive, 1) = 1 ), Unioned AS ( SELECT BlogName, PostID, LatestNoteTimestamp, NotesGatheredDateTime, CNT, PostDate FROM PostsWithCount WHERE NotFound = 0 AND HasNotesGathered = 0 UNION SELECT BlogName, PostID, LatestNoteTimestamp, NotesGatheredDateTime, CNT, PostDate FROM PostsWithCount WHERE BlogName = 'zomb-eh' AND NotFound = 0 AND NotesGatheredDateTime < unixepoch('now', 'localtime', '-3 days') ) SELECT U.BlogName, U.PostID, U.LatestNoteTimestamp, U.NotesGatheredDateTime, U.CNT FROM Unioned U WHERE (U.NotesGatheredDateTime < 1786134037 OR U.NotesGatheredDateTime IS NULL) ORDER BY U.NotesGatheredDateTime, U.PostDate DESC, U.BlogName, U.PostID;delete from posts where postid in ( '741662499571728384', 178892849664, 178264721139, 177012868749, 169950081964, 755440787056099328 )select * -- delete from notes where postid not in (select distinct postid from posts where IsActive = 1)SELECT * FROM POSTS P WHERE P.ByLikes = 1 AND P.DateCreated > '2026-05-26 17:47:32' ORDER BY P.DateCreated descupdate posts set IsActive = 0 where blogname IN ( 'shoebiedoo', 'redheaded-girlygirl', 'xlittle-ghost' )update Posts set IsActive = 0 where postid in ( '731937314675310592' )