MySQL和Kayako数据库:

时间:2014-09-18 13:48:39

标签: mysql

下面的查询是一种享受,但是我想根据日期范围添加到混合中,例如今天关闭的票数是多少?

Select count(*) from swtickets
 inner join swdepartments on swtickets.departmentid = swdepartments.departmentid
 inner join swticketstatus on swtickets.ticketstatusid = swticketstatus.ticketstatusid
 inner join swticketpriorities on swtickets.priorityid = swticketpriorities.priorityid
 where
 swdepartments.title = "IT Support Desk" and
 (
  swticketstatus.title = "Resloved"
  OR
  swticketstatus.title = "Closed"
 )

0 个答案:

没有答案