1
select pd.state AS StateName, pd.county AS `County Name`,
SUM(pc.close_dt >= CURDATE() - INTERVAL 3 MONTH) AS `0-3 Months`,
SUM(`0-3 Months` - INTERVAL 3 MONTH) AS `3-6 Months`
from resnet.property_details pd join
resnet.property_closings pc
on pd.property_id = pc.Property_id
group by pd.state, pd.county;
如何從前面的3個月間隔值獲取3個月間隔?所以它會是3-6個月?mySQL:從前一個間隔獲取3個月間隔