MySQL Select and IF() Statement
问题 I'm kind of new to MySQL and I need help. I have a table Invoices and a table Payments . I am having trouble generating a report that will show all invoices that were paid in In Full or a Partial Payment was received by 12/31/2019. One Invoice can be paid by one or more payments (For example a partial payment, such as 25% down, and the remainder payment on completion of work). How can I create SQL query that will select ALL records from Invoices and then for each Invoice select matching