1.mysql 的sql语句实现查找Billing表,将Billing中账户为goldwind_it_application的11月份Date = '2024-11-01 00:00:00' 的是否报销Reimbursement ="是"的项目EnterpriseProject的12月份的所有信息查询到
SELECT sum(Cost) FROM Billing WHERE Date = '2024-12-01 00:00:00' AND AccountId= 'goldwind_it_application' AND EnterpriseProject IN (SELECT EnterpriseProjectFROM BillingWHERE MONTH(Date) = 11AND Date = '2024-11-01 00:00:00'AND Reimbursement = '是'AND Billing.AccountId = "goldwind_it_application");