This commit is contained in:
gsinghpal
2026-05-21 03:37:25 -04:00
parent b2f483d67c
commit 1314f4581d
47 changed files with 5730 additions and 177 deletions

View File

@@ -0,0 +1,19 @@
\pset border 2
\pset format aligned
\echo '== Garry vs Gurpreet on westin =='
SELECT u.id, u.login, u.active, u.share, u.create_date, u.write_date,
u.x_fc_tech_sync_id,
(SELECT COUNT(*) FROM fusion_technician_task t WHERE t.technician_id = u.id) AS total_tasks,
(SELECT MAX(create_date) FROM fusion_technician_task t WHERE t.technician_id = u.id) AS last_task_create,
(SELECT COUNT(*) FROM mail_message m WHERE m.author_id = u.partner_id) AS messages
FROM res_users u
WHERE u.id IN (2, 85);
\echo ''
\echo '== HK detail on westin =='
SELECT u.id, u.login, p.name AS partner_name, p.email, p.phone, p.mobile,
u.x_fc_is_field_staff, u.x_fc_tech_sync_id, u.active
FROM res_users u
JOIN res_partner p ON p.id = u.partner_id
WHERE u.id = 39;