SQL Query for timebookings on projects epics, sprints, stories and items for Zoho Analytics
At CEYOND, we use Zoho Sprints for our agile projects. To evaluate and charge the effort of the tasks we use Zoho Analytics.
With this SQL query you could access all relevant accounting data and assign it to projects, sprints, epics, stories and items. Hope this helps.
- SELECT
- date(substr(t."Log Date", 1, 10)) "Log Date",
- t."Description" "Description",
- t."Log Time in Minutes" "Log Time in Minutes",
- t."Log Time in Hours" "Log Time in Hours",
- t."Last Updated Time" "Last Updated Time",
- t."Billable Type" "Billable Type",
- ou."User Name" "Owner",
- au."User Name" "Approved By",
- p."Project Name" 'Project Name',
- s."Sprint Name" 'Sprint Name',
- s."Sprint Type" 'Sprint Type',
- i."Item No" 'Item No',
- i."Item Name" 'Item Name',
- i."Item Type Name" 'Item Type Name',
- i."Priority Name" 'Item Priority Name',
- e."Epic Name" 'Epic Name',
- e."Epic Type" 'Epic Type'
- FROM "Timesheets (Zoho Sprints)" t
- LEFT JOIN "Users (Zoho Sprints)" au ON (au."ZSUser ID" = t."Approved By")
- LEFT JOIN "Users (Zoho Sprints)" ou ON (ou."ZSUser ID" = t."Owner ID")
- LEFT JOIN "Items (Zoho Sprints)" i ON (i."Item ID" = t."Item ID")
- LEFT JOIN "Sprints (Zoho Sprints)" s ON (s."Sprint ID" = i."Sprint ID")
- LEFT JOIN "Epics (Zoho Sprints)" e ON (e."Epic ID" = i."Epic ID")
- LEFT JOIN "Projects (Zoho Sprints)" p ON (p."Project ID" = i."Project ID")
- ORDER BY t."Log Date"