Hi all,
I am using a SQL statement via ODBC to query a CRM table.
I want to group the results by number of appointments in a month by company.
So my raw data example is
Company Name Appointment Date Appointment Type
Joe Bloggs 01/01/2018 Audit
Joe Bloggs 02/01/2018 Audit
Joe Bloggs 05/03/2018 Other
I want my query to just return a single line for Joe Bloggs for an Audit in January 2018. I don't care that is was over 2 days. Then to return Joe Bloggs for an Other appointment in March 2018.
The only way I could think to do this is to get my SQL statement to change the Appointment date field to EOMONTH, in this case 31/01/2018 & 31/03/2018 and I can then group by this field.
If this is the best option does anyone know how I can do this via SQL?
If there are easier options I am overlooking I'm all ears too!
Thanks in advance
I am using a SQL statement via ODBC to query a CRM table.
I want to group the results by number of appointments in a month by company.
So my raw data example is
Company Name Appointment Date Appointment Type
Joe Bloggs 01/01/2018 Audit
Joe Bloggs 02/01/2018 Audit
Joe Bloggs 05/03/2018 Other
I want my query to just return a single line for Joe Bloggs for an Audit in January 2018. I don't care that is was over 2 days. Then to return Joe Bloggs for an Other appointment in March 2018.
The only way I could think to do this is to get my SQL statement to change the Appointment date field to EOMONTH, in this case 31/01/2018 & 31/03/2018 and I can then group by this field.
If this is the best option does anyone know how I can do this via SQL?
If there are easier options I am overlooking I'm all ears too!
Thanks in advance