TAC Trialplus
view name = 'tac_trialPlus'
[NEW] Query
SELECT date_trunc('day'::text, "trialPlus_date")::date AS date,
to_char(date_trunc('month'::text, "trialPlus_date")::date::timestamp with time zone, 'YYYY Mon'::text) AS month,
(to_char(date_trunc('week'::text, "trialPlus_date")::date::timestamp with time zone, 'DD Mon'::text) || ' - '::text) || to_char(date_trunc('week'::text, "trialPlus_date")::date + '6 days'::interval, 'DD Mon'::text) AS week,
branch,
contact_owner,
assigned_pic,
last_created_by,
source,
sremarks,
medium,
mremarks,
count("trialPlus_date") AS trialplus
FROM combined
WHERE hide IS NULL OR hide = false
GROUP BY (date_trunc('week'::text, "trialPlus_date")::date), (date_trunc('day'::text, "trialPlus_date")::date), (to_char(date_trunc('month'::text, "trialPlus_date")::date::timestamp with time zone, 'YYYY Mon'::text)), ((to_char(date_trunc('week'::text, "trialPlus_date")::date::timestamp with time zone, 'DD Mon'::text) || ' - '::text) || to_char(date_trunc('week'::text, "trialPlus_date")::date + '6 days'::interval, 'DD Mon'::text)), branch, contact_owner, assigned_pic, last_created_by, source, sremarks, medium, mremarks
ORDER BY (date_trunc('day'::text, "trialPlus_date")::date);
Last updated