SELECT a.id_client, b.login , a.client_type,a.caller_id,a.called_number,a.call_start,a.call_end,a.cost,a.duration,a.tariffdesc
FROM calls a
INNER JOIN clientsshared B ON A.id_client = B.id_client
where a.route_type = 0 and a.client_type = 32
Order by a.call_start desc limit 3000
INTO OUTFILE 'c:/cccall00.csv' FIELDS TERMINATED BY ",'" LINES TERMINATED BY '\r\n'
;
SELECT a.id_client, b.login , a.client_type,a.caller_id,a.called_number,a.call_start,a.call_end,a.cost,a.duration,a.tariffdesc
FROM calls a
INNER JOIN clientse164 B ON A.id_client = B.id_client
where a.route_type = 0 and a.client_type = 2
Order by a.call_start desc limit 3000
INTO OUTFILE 'c:/cccall01.csv' FIELDS TERMINATED BY ",'" LINES TERMINATED BY '\r\n'
;
SELECT a.id_client, b.login , a.client_type,a.caller_id,a.called_number,a.call_start,a.call_end,a.cost,a.duration,a.tariffdesc
FROM calls a
INNER JOIN clientspin B ON A.id_client = B.id_client
where a.route_type = 0 and a.client_type = 8
Order by a.call_start desc limit 3000
INTO OUTFILE 'c:/cccall02.csv' FIELDS TERMINATED BY ",'" LINES TERMINATED BY '\r\n'
;