08-25-2026 20:17:58 SQL Statement: SELECT t.id, t.device_id, t.box_serial, t.software_serial, t.extension_count, t.acd_extension_count, t.support_end_date, t.update_end_date, t.devicetype_id, t.devicetype_typeName, t.devicetype_status, t.deviceinfo_id, t.deviceinfo_type, t.deviceinfo_box_num, t.deviceinfo_notes, t.customerdevice_id, t.customerdevice_customer_id, t.customerdevice_deviceId, t.customer_id, t.customer_account_number, t.customer_first_name, t.customer_last_name, t.customer_company_name, t.customer_status, t.customer_inactivation FROM (SELECT device_licensing.id AS id, device_licensing.device_id AS device_id, device_licensing.box_serial AS box_serial, device_licensing.software_serial AS software_serial, device_licensing.extension_count AS extension_count, device_licensing.acd_extension_count AS acd_extension_count, device_licensing.support_end_date AS support_end_date, device_licensing.update_end_date AS update_end_date, device_info.id AS deviceinfo_id, device_info.type AS deviceinfo_type, device_info.box_num AS deviceinfo_box_num, device_info.notes AS deviceinfo_notes, device_type.id AS devicetype_id, device_type.typeName AS devicetype_typeName, device_type.status AS devicetype_status, customer_device.id AS customerdevice_id, customer_device.customer_id AS customerdevice_customer_id, customer_device.deviceId AS customerdevice_deviceId, customer.id AS customer_id, customer.account_number AS customer_account_number, customer.first_name AS customer_first_name, customer.last_name AS customer_last_name, customer.company_name AS customer_company_name, customer.status AS customer_status, customer.inactivation AS customer_inactivation FROM device_licensing device_licensing LEFT JOIN device_info device_info ON device_info.id = device_licensing.device_id LEFT JOIN device_type device_type ON device_type.id = device_info.type LEFT JOIN customer_device customer_device ON customer_device.deviceId = device_licensing.device_id LEFT JOIN customer customer ON customer.id = customer_device.customer_id) AS t WHERE t.devicetype_id IN ('2', '5', '7') AND t.customer_status = '1' ORDER BY t.support_end_date