我有以下 2 个表:
user_table:
user_id
job_id
job_link
job_table:
job_id
click_ip
click_date
我必须计算当前用户每个作业的不同点击次数和所有点击次数。谁能告诉我当前的表结构是否可行并对此有答案。谢谢。
我当前的查询也尝试了内部连接:
SELECT `user_id` , job.job_id AS job_id, `job_link`,
COUNT( job.click_ip ) AS click_ip
FROM `job` , `user`
WHERE job.job_id = user.job_id
AND user.user_id =7
GROUP BY job_id