How many photos use Olympus camera lenses?
select count ( * ) from photos as t1 join camera_lens as t2 on t1.camera_lens_id = t2.id where t2.brand = 'Olympus'
Yes
select t1.name from photos as t1 join camera_lens as t2 on t1.camera_lens_id = t2.id group by t1.name having t2.brand = 'Olympus'
What are the names of the photos that use a Sigma lens?
select t2.name from camera_lens as t1 join photos as t2 on t2.camera_lens_id = t1.id where t1.brand = 'Sigma'
How many photos use a Sigma lens?
select count ( * ) from photos as t1 join camera_lens as t2 on t1.camera_lens_id = t2.id where t2.brand = 'Sigma'
What are their photo names?
select t1.name from photos as t1 join camera_lens as t2 on t1.camera_lens_id = t2.id where t2.brand = 'Sigma'