Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
select distinct( inet_ntoa(device_ip) ) from cdr where  init_time_gmt>='2016-01-01' and client_owner_id=2944 and ext_type='phone' and device_ip>0 
#/* или с одновременным поиском идентификатора клиента */
select distinct( inet_ntoa(device_ip) ) from cdr where  init_time_gmt>='2016-01-01' and client_owner_id=(select rc.id from ringme.client rc, ringme.domain rd where rc.domain_id=rd.id and prefix='0004' and rd.name='mydomain') and ext_type='phone' and device_ip>0 

...