我的销售表包含customer_id
time_id
我想计算一次客户购买的产品。
我正在运行查询
select customer_id,time_id,count(time_id) as count from sales where customer_id=2094 group by time_id.
此查询运行并给出结果,但我在另一个客户表中有不同的customer_ids然后我运行此查询
select customer_id,time_id,count(time_id) as count from sales where customer_id in (select customer_id from customer) group by time_id.
但它没有显示确切的结果。