if there are thousands of photos selecting them using command key and tapping them is impractical , also some one suggested click on moments , hold command key and tap few photos then again click on share all items in moments .
Again tap the pictures in moments will be selected .
Also moments pictures are saved as month and date and the pictures saved in photo library are different so this method of selecting photos using moments is inappropriate .
You can set up iCloud photo library Set up and use iCloud Photos - Apple Support
And select photos Select and deselect photos in Photos on Mac - Apple Support