VERIFIED SOLUTION i
X

How to use SQL to Count how many Confirm Enquiry Entries/Updates a Client Makes in a Month

UPDATED: July 18, 2017


Use this SQL script to count of how many Enquiry entries/updates a client makes throughout a month:

SELECT
   TO_CHAR( enquiry_status_log.logged_date, 'YYYY-MM-DD') as year_month,
   COUNT(*) as enquiries_updated
FROM
   enquiry_status_log
WHERE
   TO_CHAR( enquiry_status_log.logged_date, 'YYYY-MM') = '2016-05'
GROUP BY
   TO_CHAR( enquiry_status_log.logged_date, 'YYYY-MM-DD')
 

Environment Details

Database: Oracle

Downloads

  • No Downloads