我有以下查询,它应该给我从现在起 30 天到期的商品交易的详细信息。
SELECT *
FROM transactions T1
INNER JOIN employee T3 ON employee.id = transactions.user_id
INNER JOIN transactions T2 USING(expiry_date) WHERE T2.expiry_date >= CURDATE() AND T1.expiry_date < now() + interval 1 month
当我运行查询时,我收到以下错误:
#1054 - Unknown column 'employee.id' in 'on clause'
我该如何解决上述问题?