All Leads in current fiscal year

Dynamics CRM

 

Dynamics CRM is a widely used cloud CRM from Microsoft, focused on Sales, Marketing, and Service (help desk) sectors.

Display all the leads created in the current fiscal year

Query Text

SELECT lead.fullname, lead.subject AS Topic, lk_leadbase_createdby.fullname AS Owner, lead.statuscode AS Status_Reason, lead.createdon
  FROM lead
LEFT OUTER JOIN systemuser AS lk_leadbase_createdby ON lead.createdby = lk_leadbase_createdby.systemuserid
WHERE (date(date(lead.createdon), 'start of year') = date('now', 'localtime', 'start of year'))
ORDER BY lead.fullname
  

Open Query