MySQL Inner join and sum two columns

后端 未结 3 1277
时光取名叫无心
时光取名叫无心 2021-01-29 10:22

I have the following tables

TABLE: appointments

ID | PRICE | PAID
48 |  100  | 180

TABLE: appointments_product

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-29 10:52

    Use where to check if price is equal to paid and the use group by to group with appointment_id.

提交回复
热议问题