这段代码出了什么问题,两个子选择语句都运行良好但是完全连接给我错误
select t1.*, t2.*
from (
SELECT
`users-transaction`.`users-transaction-id` as 'id-1',
concat(`users-transaction`.`users-transaction-year`+ `users-transaction`.`users-transaction-month`+ `users-transaction`.`users-transaction-day`) as date1,
sum(`users-transaction`.`users-transaction-price`) as gharzi
FROM `users-transaction`
where `users-transaction`.`users-transaction-type`=0
GROUP BY `users-transaction-year`, `users-transaction-month`, `users-transaction-day`
) t1
full outer JOIN
(
SELECT
`users-transaction`.`users-transaction-id` as 'id-2',
concat(`users-transaction`.`users-transaction-year`+ `users-transaction`.`users-transaction-month`+ `users-transaction`.`users-transaction-day`) as date2,
sum(`users-transaction`.`users-transaction-price`) as pardakhti
FROM `users-transaction`
where `users-transaction`.`users-transaction-type`=1
GROUP BY `users-transaction-year`, `users-transaction-month`, `users-transaction-day`
) t2 on t1.date1=t2.date2
表格结构: