我对数据库相当陌生,我刚刚开始了解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