我試圖執行這個查詢的SQL查詢,但其示值誤差無法執行超過
select
order_id,
product_id
from (select
order_id,
product_id,
count(*) over(partition by order_id, product_id) as dc
from order_items
)
where dc > 1 ;
錯誤我得到是
您的SQL語法錯誤;檢查對應於您的MySQL服務器版本的手冊,以便在'(partition by order_id,product_id)'作爲來自order_items的dc時使用正確的語法。其中,第1行的dc> 1'
http://forums.mysql.com/read.php?32,225340,225340#msg-225340 – Barmar
我上面的查詢任何解決方案?請幫助我,現在我處於悲慘的狀態w.r.t此查詢 – obama
在我發佈的鏈接上有解決方法。 – Barmar