SELECT T1.owner_id, T1.zip_code 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 SUM(T3.cost_of_treatment) DESC LIMIT 1
Pemilik mana yang telah membayar jumlah uang terbesar secara total untuk anjing mereka?Tunjukkan ID pemilik dan kode pos.
CREATE TABLE Treatments (dog_id VARCHAR, cost_of_treatment INTEGER); CREATE TABLE Owners (owner_id VARCHAR, zip_code VARCHAR); CREATE TABLE Dogs (owner_id VARCHAR, dog_id VARCHAR)