MySQL查询以查找特定客户
我有一个SQL表MySQL查询以查找特定客户,mysql,Mysql,我有一个SQL表 customerID productID dateofPurchase special 10 1234 2010-12-06 00:00:00.0 NO 10 2345 2010-12-07 00:00:00.0 YES 11 1245 2010-12-08 00:00:00.0
customerID productID dateofPurchase special
10 1234 2010-12-06 00:00:00.0 NO
10 2345 2010-12-07 00:00:00.0 YES
11 1245 2010-12-08 00:00:00.0 NO
我已经按照customerID
和dateofPurchase对表进行了排序。
我想回答几个问题,但我想不出一个逻辑
你试过什么?这不是代码编写服务。请参阅:同意其他人的意见。但是会提供一些搜索建议-对于1)-你可以在2个日期做“数学”-MySQL文档在这方面非常好;2) -GROUP BY将处理多个列(然后使用“HAVING”指定只显示多个购买的项目)。祝你好运