Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.78 KB | None | 0 0
  1. /* Statement 1:
  2.     Find completed rechecks from current year (or last 12 months) and tally them up by staff member
  3.         Object is to understand current workload */
  4. SELECT dbo_a2contact.t_contfollowupstaff,
  5.        Count(dbo_a2contact.parcelno) AS CountOfParcelNo
  6. FROM (dbo_a2contact
  7.       INNER JOIN dbo_asassesroll ON dbo_a2contact.parcelno = dbo_asassesroll.parcelno)
  8. INNER JOIN dbo_asco ON (dbo_asassesroll.year = dbo_asco.curryear)
  9. AND (dbo_asassesroll.cono = dbo_asco.cono )/* Options here would be great, maybe last 12 months, or multiple pages like the sales one*/
  10. WHERE ( ((dbo_a2contact.done) = -1)
  11.   AND ((dbo_asassesroll.usecode) = "r")
  12.   AND ( (dbo_a2contact.contdate) >=# 1/1/2018 # ) )
  13.  GROUP  BY dbo_a2contact.t_contfollowupstaff
  14.   ORDER  BY dbo_a2contact.t_contfollowupstaff;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement