# TAC Appt MQLPlus

{% code title="tac\_appt\_mqlplus" overflow="wrap" lineNumbers="true" %}

```plsql
 SELECT date_trunc('day'::text, "mqlPlus_date")::date AS date,
    to_char(date_trunc('month'::text, "mqlPlus_date")::date::timestamp with time zone, 'YYYY Mon'::text) AS month,
    (to_char(date_trunc('week'::text, "mqlPlus_date")::date::timestamp with time zone, 'DD Mon'::text) || ' - '::text) || to_char(date_trunc('week'::text, "mqlPlus_date")::date + '6 days'::interval, 'DD Mon'::text) AS week,
    branch,
    contact_owner,
    assigned_pic,
    created_by,
    count("mqlPlus_date") AS appt_mqlplus
   FROM appt
  WHERE hide IS NULL OR hide = false
  GROUP BY (date_trunc('week'::text, "mqlPlus_date")::date), (date_trunc('day'::text, "mqlPlus_date")::date), (to_char(date_trunc('month'::text, "mqlPlus_date")::date::timestamp with time zone, 'YYYY Mon'::text)), ((to_char(date_trunc('week'::text, "mqlPlus_date")::date::timestamp with time zone, 'DD Mon'::text) || ' - '::text) || to_char(date_trunc('week'::text, "mqlPlus_date")::date + '6 days'::interval, 'DD Mon'::text)), branch, contact_owner, assigned_pic, created_by
  ORDER BY (date_trunc('day'::text, "mqlPlus_date")::date);
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://work.bahrul.me/work/kyzn/database-management/table-view/tac-appt-mqlplus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
