human
Schema:
mountain (id, name, Height, Prominence, Range, Country)
camera_lens (id, brand, name, focal_length_mm, max_aperture)
photos (id, camera_lens_id, mountain_id, color, name)
Please answer with SQL.
assistant
Sure, I understand.
human
For each photo, show the id of the camera lens that has taken it.
assistant
SELECT camera_lens_id FROM photos;
human
Which photos were taken with the lens brand 'Sigma' or 'Olympus'?
assistant
SELECT * FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus';
human
Give me the photo names.
assistant
SELECT T2.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = "Sigma" OR T1.brand = "Olympus" ;