Wikipedia:List of lists/uncategorized/How to update

DROP TABLE IF EXISTS temp_lists;

CREATE TABLE temp_lists SELECT CONCAT('#',REPLACE(REPLACE(cur_title,'List_of_',),'_',' '), ) AS List_of_lists, cur_title, cur_id FROM `cur` WHERE ( cur_title LIKE 'List_of%'     OR cur_title LIKE 'Table_of%'      OR cur_title LIKE 'Lists_of%' ) AND cur_namespace=0 AND cur_is_redirect=0 ORDER BY Lower(cur_title) LIMIT 100000;

DELETE FROM temp_lists USING temp_lists, categorylinks WHERE temp_lists.cur_id=cl_from AND cl_to LIKE 'Lists%';

DELETE FROM temp_lists USING temp_lists, categorylinks WHERE temp_lists.cur_id=cl_from AND ( cl_to = 'Episode_lists'		OR cl_to = 'Lines_of_succession'	OR cl_to = 'Timelines'		OR cl_to = 'Topic_lists'		OR cl_to = '%timelines'		OR cl_to = 'Regional_bird_lists'	OR cl_to = 'List_of_pieces');

DELETE FROM temp_lists USING temp_lists, categorylinks WHERE temp_lists.cur_id=cl_from AND cl_to LIKE 'Lists%';

SELECT List_of_lists INTO OUTFILE 'wp_uncategorizedlists.txt'      #change this to your drive/path/filename FROM temp_lists LIMIT 10000;