For all you beginners like me who want to communicate with your plex database and reference Movie names or TV Show names here is a simple SQL command to retrieve everything.
GET ALL TV SHOWS:
SELECT title FROM metadata_items WHERE parent_id IS NULL AND metadata_type=‘2’
GET ALL MOVIES:
SELECT title FROM metadata_items WHERE parent_id IS NULL AND metadata_type=‘1’
Hope this helped someone =)
Took me a while of going through the database to understand how to retrieve this, hard to find anywhere on google.