SELECT
hist_data_china.ProvinceName AS 省份,
hist_data_china.CityName AS 城市,
max( hist_data_china.CityConfirm ) AS 确诊数,
hist_data_china.CityHeal AS 死亡数,
hist_data_china.CityDead AS 治愈数,
tab.date
FROM
( SELECT DISTINCT ProvinceName, CityName, date( UpdateTime ) AS date FROM hist_data_china WHERE date( UpdateTime ) != "${=today()}" ORDER BY date ) AS tab,
hist_data_china
WHERE
tab.ProvinceName = hist_data_china.ProvinceName
AND tab.CityName = hist_data_china.CityName
AND hist_data_china.ProvinceName = "湖北省"
AND date( hist_data_china.UpdateTime ) = tab.date
GROUP BY
hist_data_china.ProvinceName,
hist_data_china.CityName,
tab.date
ORDER BY
date
|