Database: real_estate_rentals
Question: How many photos does each owner has of his or her properties? List user id and number of photos.
SQL:
SELECT T1.owner_user_id ,  count(*) FROM Properties AS T1 JOIN Property_Photos AS T2 ON T1.property_id  =  T2.property_id GROUP BY T1.owner_user_id;