# Iceshrimp SQL Snippets ## Introduction: A selection of SQL scripts for the Iceshrimp PostgreSQL database Some of the SQL scripts need the "userId" This can be found from the Iceshrimp Homepage: * Profile | 3 little round buttons | About | ID *(The ID is the 10 digit alphanumeric string)* ## Files: * ### [SELECT_last_followee_note_dated.sql] Links the 'note', 'user' and 'following' tables to show the last date that a followee posted * ### [SELECT_last_follower_note_dated.sql] Links the 'note', 'user' and 'following' tables to show the last date that a follower posted * ### [SELECT_my_notes.sql] Links the 'note' and 'user' tables to show a chosen users notes (toots, tweets, whatever you want to call them) * ### [SELECT_my_notes_and_user_info.sql] Brings **ALL** the fields back from the joined 'note' and 'user' tables * ### [SELECT_notes_over_90_days.sql] Shows all of the pubic.notes that are over 90 days old * ### [DELETE_VACUUM_public_note.sql] **WARNING:** This script will will DELETE and then VACUUM the rows in 'pubic.note' that are over 10 days old I run this script nightly and it seems to have no ill effect on my single user instance YMMV You have been warned