Query to display task details and associated account (start date, due date, createdby, assigned to, etc.,)

Query to display task details and associated account (start date, due date, createdby, assigned to, etc.,)

Use the below query to show all task information (columns listed : taskid, title, Linked account, start date, due date, status, Description, Assigned to, Created by and Created time)


select td.taskid, ad.title, org.name as "Linked Account", longtodate(td.Starttime) as "Start Date", longtodate(td.Duebytime) as "Due Date", astat.Statusname as "Status", ad.description as "Description", aa.First_name as  "Assigned to", aal.Name as "Created by", longtodate(ad.Createdtime) from taskdefinition td left join activitydefinition ad on td.Taskid=ad.Activityid left join customer_activity cact on ad.Activityid=cact.Activityid left join aaaorganization org on cact.Customer_id=org.Org_id left join activitystatus astat on td.Statusid=astat.statusid left join aaauser aa on td.Ownerid=aa.User_id left join aaalogin aal on ad.Createdby=aal.User_id

                  New to ADSelfService Plus?

                    • Related Articles

                    • Query to show Request and associated task details (PGSQL & MSSQL)

                      Tested in build PGSQL (14300) and MSSQL (14306) PGSQL & MSSQL: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", wo.TITLE AS "Subject", pd.PRIORITYNAME AS "Priority", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", ...
                    • Script to send custom reminder notification to notify task owner based on scheduled start and end time.

                      Prerequisites: 1. Python Installation Steps : https://pitstop.manageengine.com/portal/kb/articles/how-to-setup-python-on-the-server 2. functions.py : This package consists of all the functions that are used to handle the standard requirements of the ...
                    • Task related reports (MSSQL)

                      Tested in MSSQL build (14306) Sample Output and headers present in this report Goto reports -> New query report and executes the following SELECT taskdet.TASKID AS "Task ID", taskdet.MODULE AS "Module", taskprior.PRIORITYNAME AS "Priority", ...
                    • Contract Details

                      SELECT mcdt.Contractid "Contract ID", mcdt.CONTRACTNAME "Contract Name", mcdt.comments "Description", contractcategory.Categoryname "Contract Type", LONGTODATE(mcdt.CREATEDDATE) "Created Time", LONGTODATE(mcdt.FROMDATE) "From Date", ...
                    • Query to retrieve the active and expired CPH contracts details

                      Tested in: 14620, 14610 and 14306 Query 1: To return the Active CPH contracts details: select ad.org_name "Account", ad.org_name "Account", sp.serviceplanname "Service Plan", ac.CONTRACTNO "Contract No", longtodate(ac.startdate) "Contract Start ...