我對數據庫相當陌生,我剛剛開始瞭解DML /查詢,我有兩個表,一個名爲customer的客戶端包含客戶數據,另一個名爲requested_games,這包含客戶請求的遊戲,我想寫一個查詢,它將返回請求超過兩場比賽的客戶,到目前爲止,當我運行查詢時,我沒有得到期望的結果,不知道我是否做得對。重複條目數
誰能幫助這個感謝,
下面是查詢
select customers.customer_name, wants_list.requested_game, wants_list.wantslists_id,count(wants_list.customers_ID)
from customers, wants_list
where customers.customers_ID = wants_list.customers_id
and wants_list.wantslists_id = wants_list.wantslists_id
and wants_list.requested_game > '2';
非常感謝@John Ruddell,您的解決方案很有用,我能夠從查詢中獲得所需的信息。 – bigaone22 2014-10-12 01:18:26