我在使用mysql查詢時遇到了一些問題。 我試圖將多個表連接在一起。 在一張表中,我有一個成功的在線客戶列表,而在另一張桌子上,我有一個表格,它具有來自它的流量來源。我試圖追蹤哪些客戶來自某個廣告。所以我想詢問那些來自特定日期和特定活動的新客戶。Mysql錯誤代碼1064
SELECT keyword, COUNT(keyword) FROM in_clicks AS ic WHERE ic.create_date LIKE '%2011-08-19%' GROUP BY ic.keyword ORDER BY COUNT(ic.keyword) DESC
INNER JOIN leads AS l ON ls.lead_id = l.id
INNER JOIN lead_status AS ls ON ls.lead_id = ls.id
INNER JOIN ads AS a ON ic.ad_id = a.id
INNER JOIN ad_groups AS ag ON a.ad_group_id = ag.id
INNER JOIN campaigns AS c ON ag.campaign_id = c.id;
我跑了上面的代碼,並得到以下錯誤。
Error Code: 1064
'INNER JOIN leads AS l ON ls.lead_id = l.id Innner Join lead_status AS ls' at line 2
錯誤1064:您的SQL語法中有錯誤。 – Johan
你確定*這是你的查詢?你的查詢中不是「Innner」(而不是「nnner」) – Bohemian