CREATE TABLE photos (id NUMBER, camera_lens_id NUMBER, mountain_id NUMBER, color CLOB, name CLOB)
CREATE TABLE mountain (id NUMBER, name CLOB, Height FLOAT, Prominence FLOAT, Range CLOB, Country CLOB)
CREATE TABLE camera_lens (id NUMBER, brand CLOB, name CLOB, focal_length_mm FLOAT, max_aperture FLOAT)

Visualize a pie chart with what is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.
SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*)
SELECT "T1"."name", COUNT(*) FROM "camera_lens" "T1" JOIN "photos" "T2" ON "T1"."id" = "T2"."camera_lens_id" GROUP BY "T1"."id" ORDER BY COUNT(*)