SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels
SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels <table_name> : Customer_Contact_Channels col : customer_id | channel_code | active_from_date | active_to_date | contact_number row 1 : 9 | Email | 2017-12-07 18:18:15 | 2018-03-23 13:37:14 | 940.035.6435x0225 row 2 : 2 | Email | 2017-04-07 04:51:41 | 2018-03-23 01:30:52 | 189.449.8326x7607 row 3 : 9 | Email | 2017-05-25 16:08:45 | 2018-03-13 07:32:25 | 958-653-2640 row 4 : 2 | Email | 2018-01-05 21:42:56 | 2018-03-15 14:58:13 | 1-968-863-4947x96956 row 5 : 4 | Cell | 2017-08-07 08:07:10 | 2018-03-02 17:44:49 | (165)527-5756x2419 row 6 : 2 | Cell | 2017-09-21 12:41:56 | 2018-03-08 19:28:16 | 1-077-864-0102 row 7 : 3 | Handheld | 2017-05-11 12:32:16 | 2018-03-20 14:35:34 | 06068550461 row 8 : 14 | Handheld | 2017-05-23 15:20:20 | 2018-03-15 02:34:01 | 542.983.0224 row 9 : 13 | Handheld | 2017-08-26 15:16:44 | 2018-03-16 14:00:15 | (379)834-0867x267 row 10 : 6 | Handheld | 2017-07-01 17:59:48 | 2018-02-25 22:20:55 | (620)266-6990x8590 row 11 : 10 | Fax | 2017-06-21 06:41:19 | 2018-03-15 06:00:34 | (068)656-5276x84466 row 12 : 13 | Fax | 2017-10-29 04:16:39 | 2018-03-08 17:19:29 | 496-074-8589x5477 row 13 : 15 | Handheld | 2017-09-08 14:00:01 | 2018-03-04 13:35:57 | 1-687-190-8968x63811 row 14 : 2 | Handheld | 2018-03-01 10:17:18 | 2018-03-20 14:01:12 | 118.523.6764x57405 row 15 : 5 | Handheld | 2017-11-14 16:16:02 | 2018-03-02 03:22:26 | 445.924.9417 row 16 : 9 | Mobile | 2017-05-25 20:36:21 | 2018-02-24 00:57:39 | (155)830-6182 row 17 : 3 | Handheld | 2017-09-11 05:05:47 | 2018-03-14 14:56:28 | 1-453-027-1291 row 18 : 9 | Handheld | 2018-01-02 18:37:48 | 2018-03-10 05:10:35 | 026.019.5981x72518 row 19 : 10 | Cell | 2017-12-06 15:25:33 | 2018-03-19 06:34:34 | 495-168-9662 row 20 : 14 | Cell | 2017-10-17 11:46:37 | 2018-03-08 20:07:20 | 846.043.4809x0426
col : avg(active_to_date - active_from_date) row 1 : 0.85