Question: Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.
Schema: create table owners (owner_id varchar, last_name varchar, PRIMARY KEY (owner_id)); create table dogs (owner_id varchar, dog_id varchar, PRIMARY KEY (owner_id)); create table treatments (dog_id varchar, PRIMARY KEY (dog_id))
SQL: select t1.owner_id, t1.last_name from owners as t1 join dogs as t2 on t1.owner_id = t2.owner_id join treatments as t3 on t2.dog_id = t3.dog_id group by t1.owner_id order by count(*) desc limit 1