Jan 04 2022 10:18 PM
Hi
I need 6 month avg for each Ticket id . i have written below query but did get correct Average output. Please can you make it correct . i think i need to use subquery on it but i dont know how . Please suggest
select o.id,o.name as Org_Name ,pt.id as Ticket_ID, pt.date_created,
pt.date_created as Date_months, count(pt.id) AS TicketCount,
(count(pt.id))/6 AS TicketAV
from organization o
join project_task pt on pt.org_id = o.id
where pt.date_created >= '2021-01-01'
Jan 04 2022 10:32 PM
but did get correct Average output.
@Trilok_Bohra , and in which way is the result not correct?
(count(pt.id))/6
What for result do you expect here; some count divided by 6?
Please post table design as DDL, some sample data as DML statement and the expected result.
Jan 04 2022 10:51 PM
i can't share the data. its on my office system. we don't have access right . so i can share you the output file in xls format. i am looking the output with same manner
Jan 05 2022 12:56 AM
Jan 16 2022 09:11 AM