当我尝试在 mysqlite3 中运行此查询时,我不断收到错误消息:
SELECT Region_DESC, AgeGroup, Population
(select REGION, sum(POPULATION) as Population, '0-15' AS AgeGroup
from STATS
Where Age between 0 and 15
group by REGION
union
Select REGION, SUM(POPULATION) as Population, '16-30' As AgeGroup
from STATUS
Where Age between 16 and 30
group by REGION) s
join REGION on REGION_CD = REGION
我收到以下错误:错误:“SELECT”附近:语法错误
语法方面的查询有什么问题吗?