Mysql subquery problem
Hi, I have 2 tables: loans (columns: id, user) payback (columns: id, installment, scheduleDate) If a loan is to be paid in 12 installments, then there are 12 payback records with loan id. I would like to find out what users have a scheduleDate on which the sum of all their paybacks is greater than 2000. SELECT user FROM {loans} ka...