Question: List the names of the dogs of the rarest breed and the treatment dates of them.
Schema: create table dogs (name varchar, dog_id varchar, breed_code varchar, PRIMARY KEY (name)); create table treatments (date_of_treatment varchar, dog_id varchar, PRIMARY KEY (date_of_treatment)); create table dogs (breed_code varchar, PRIMARY KEY (breed_code))
SQL: select t1.name, t2.date_of_treatment from dogs as t1 join treatments as t2 on t1.dog_id = t2.dog_id where t1.breed_code = (select breed_code from dogs group by breed_code order by count(*) limit 1)