Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

get_reason_counts function – sum of all dashboarddata records per reason_id, unit_id, quarter_id (all quarters: >= some quarter_id) in a unit
Ex: E.g., select quarter_id, reason_id, count(reason_id) as count1 from txfirst_dashboarddata left join txfirst_quarter on quarter_id = txfirst_quarter.id where unit_id = 4 and txfirst_quarter.quarter >= 201601 and list_status = "working_up" group by quarter_id, reason_id order by quarter_id

...


get_total_counts function – sum of all dashboarddata records per list_status and quarter_id >= some quarter_id in a unit
ExE.g., select quarter_id, count(quarter_id) as count1 from txfirst_dashboarddata left join txfirst_quarter on quarter_id = txfirst_quarter.id where unit_id = 4 and txfirst_quarter.quarter >= 201601 and list_status = "working_up" group by quarter_id order by quarter_id

...