help with rate calculation

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

hmmm

Post by jglicken »

this is cut and paste of the last query you posted ( am i missing something)?

Code: Select all

mysql> select a.calldate, a.src, b.destination, a.dst, substring(a.dst,4), b.name, sec_to_time(a.billsec) as billsec, format((a.billsec/60 * b.rate + b.connectCost), 2) totalcost from cdr a left join rates b on a.dst regexp (concat('^', b.destination)) where src='erick' and dst like '011%' order by 'calldate' desc;
+---------------------+-------+-------------+--------------------+--------------------+------+----------+-----------+
| calldate            | src   | destination | dst                | substring(a.dst,4) | name | billsec  | totalcost |
+---------------------+-------+-------------+--------------------+--------------------+------+----------+-----------+
| 2004-07-27 10:52:52 | erick | NULL        | 0115058885694      | 5058885694         | NULL | 00:00:00 | NULL      |
| 2004-07-27 10:52:23 | erick | NULL        | 0115058885694      | 5058885694         | NULL | 00:00:00 | NULL      |
| 2004-07-27 10:51:13 | erick | NULL        | 0115058885694      | 5058885694         | NULL | 00:00:00 | NULL      |
| 2004-07-27 10:46:45 | erick | NULL        | 0115058885694      | 5058885694         | NULL | 00:00:00 | NULL      |
| 2004-07-03 13:47:34 | erick | NULL        | 011582869237134    | 582869237134       | NULL | 00:00:48 | NULL      |
| 2004-07-03 13:46:01 | erick | NULL        | 0115114229804      | 5114229804         | NULL | 00:01:50 | NULL      |
| 2004-06-30 00:10:42 | erick | NULL        | 011582869237134    | 582869237134       | NULL | 00:19:16 | NULL      |
| 2004-06-29 23:50:15 | erick | NULL        | 011582869237134    | 582869237134       | NULL | 00:00:51 | NULL      |
| 2004-05-09 00:11:40 | erick | NULL        | 011582869237134    | 582869237134       | NULL | 00:03:18 | NULL      |
| 2004-04-17 13:52:56 | erick | NULL        | 011582869237134    | 582869237134       | NULL | 00:01:44 | NULL      |
| 2004-04-17 13:50:20 | erick | NULL        | 011582869237134    | 582869237134       | NULL | 00:00:00 | NULL      |
| 2004-04-17 13:48:21 | erick | NULL        | 011584142869237134 | 584142869237134    | NULL | 00:00:00 | NULL      |
| 2004-04-17 13:45:23 | erick | NULL        | 011584142869237134 | 584142869237134    | NULL | 00:00:00 | NULL      |
| 2004-04-16 18:51:01 | erick | NULL        | 011584148681837    | 584148681837       | NULL | 00:01:16 | NULL      |
| 2004-04-16 10:23:00 | erick | NULL        | 0115114220165      | 5114220165         | NULL | 00:00:03 | NULL      |
+---------------------+-------+-------------+--------------------+--------------------+------+----------+-----------+
15 rows in set (0.00 sec)
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

i think i got it

Post by jglicken »

thanks for your help, you pointed me in the right direction, but your query was based on the actual dst and i need substring(a.dst,4) to strip off the 011 (like the show tables above). again i would not have figured this out if it was not for your help. :)

jason
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the join's failing.. it may be because of this:

Code: Select all

and dst like '011%'
try

Code: Select all

select a.calldate, a.src, b.destination, a.dst, substring(a.dst,4), b.name, sec_to_time(a.billsec) as billsec, format((a.billsec/60 * b.rate + b.connectCost), 2) totalcost from cdr a left join rates b on a.dst regexp (concat('^', b.destination)) where src='erick' order by 'calldate' desc
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

i figured it out

Post by jglicken »

we were concating a.dst, not substring(a.dst,4) :)

Code: Select all

mysql> select a.calldate, a.src, b.destination, a.dst, b.name, sec_to_time(a.billsec) as billsec, format((a.billsec/60 * b.rate + b.connectCost), 2) totalcost from cdr a left join rates b on substring(a.dst,4) regexp (concat('^', b.destination)) where src='erick' and dst like '011%' order by 'calldate' desc;
+---------------------+-------+-------------+--------------------+------------------+----------+-----------+
| calldate            | src   | destination | dst                | name             | billsec  | totalcost |
+---------------------+-------+-------------+--------------------+------------------+----------+-----------+
| 2004-07-27 10:52:52 | erick | NULL        | 0115058885694      | NULL             | 00:00:00 | NULL      |
| 2004-07-27 10:52:23 | erick | NULL        | 0115058885694      | NULL             | 00:00:00 | NULL      |
| 2004-07-27 10:51:13 | erick | NULL        | 0115058885694      | NULL             | 00:00:00 | NULL      |
| 2004-07-27 10:46:45 | erick | NULL        | 0115058885694      | NULL             | 00:00:00 | NULL      |
| 2004-07-03 13:47:34 | erick | NULL        | 011582869237134    | NULL             | 00:00:48 | NULL      |
| 2004-07-03 13:46:01 | erick | 511         | 0115114229804      | Peru Lima        | 00:01:50 | 0.23      |
| 2004-06-30 00:10:42 | erick | NULL        | 011582869237134    | NULL             | 00:19:16 | NULL      |
| 2004-06-29 23:50:15 | erick | NULL        | 011582869237134    | NULL             | 00:00:51 | NULL      |
| 2004-05-09 00:11:40 | erick | NULL        | 011582869237134    | NULL             | 00:03:18 | NULL      |
| 2004-04-17 13:52:56 | erick | NULL        | 011582869237134    | NULL             | 00:01:44 | NULL      |
| 2004-04-17 13:50:20 | erick | NULL        | 011582869237134    | NULL             | 00:00:00 | NULL      |
| 2004-04-17 13:48:21 | erick | 58414       | 011584142869237134 | Venezuela Mobile | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 58414       | 011584142869237134 | Venezuela Mobile | 00:00:00 | 0.05      |
| 2004-04-16 18:51:01 | erick | 58414       | 011584148681837    | Venezuela Mobile | 00:01:16 | 0.30      |
| 2004-04-16 10:23:00 | erick | 511         | 0115114220165      | Peru Lima        | 00:00:03 | 0.06      |
+---------------------+-------+-------------+--------------------+------------------+----------+-----------+
15 rows in set (0.00 sec)
again, thank you very much for showing me how to do this it is very helpful :)

jason
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

ok, i am very close

Post by jglicken »

i am getting multiple matches based on my concat query. is there a way for me to pattern match starting from the right and getting one result per variable based on closest match from the right?

Code: Select all

select a.calldate, a.src, a.dst, b.name, sec_to_time(a.billsec) as billsec, format((a.billsec/60 * b.rate + b.connectCost), 2) totalcost from cdr a left join rates b on substring(a.dst,4) regexp left((concat('^', b.destination)), 8) where src='erick' and dst like '011%' order by 'calldate' desc;

+---------------------+-------+--------------------+----------------------+----------+-----------+
| calldate            | src   | dst                | name                 | billsec  | totalcost |
+---------------------+-------+--------------------+----------------------+----------+-----------+
| 2004-07-27 10:52:52 | erick | 0115058885694      | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:52:52 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:52:52 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-03 13:47:34 | erick | 011582869237134    | VENEZUELA            | 00:00:48 | 0.59      |
| 2004-07-03 13:47:34 | erick | 011582869237134    | VENEZUELA ROC        | 00:00:48 | 0.59      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | PERU                 | 00:01:50 | 0.48      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | PERU LIMA            | 00:01:50 | 0.48      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | PERU LIMA            | 00:01:50 | 0.48      |
| 2004-06-30 00:10:42 | erick | 011582869237134    | VENEZUELA            | 00:19:16 | 13.15     |
| 2004-06-30 00:10:42 | erick | 011582869237134    | VENEZUELA ROC        | 00:19:16 | 13.15     |
| 2004-06-29 23:50:15 | erick | 011582869237134    | VENEZUELA            | 00:00:51 | 0.63      |
| 2004-06-29 23:50:15 | erick | 011582869237134    | VENEZUELA ROC        | 00:00:51 | 0.63      |
| 2004-05-09 00:11:40 | erick | 011582869237134    | VENEZUELA            | 00:03:18 | 2.29      |
| 2004-05-09 00:11:40 | erick | 011582869237134    | VENEZUELA ROC        | 00:03:18 | 2.29      |
| 2004-04-17 13:52:56 | erick | 011582869237134    | VENEZUELA            | 00:01:44 | 1.23      |
| 2004-04-17 13:52:56 | erick | 011582869237134    | VENEZUELA ROC        | 00:01:44 | 1.23      |
| 2004-04-17 13:50:20 | erick | 011582869237134    | VENEZUELA            | 00:00:00 | 0.05      |
| 2004-04-17 13:50:20 | erick | 011582869237134    | VENEZUELA ROC        | 00:00:00 | 0.05      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | VENEZUELA            | 00:00:00 | 0.05      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | VENEZUELA MOB        | 00:00:00 | 0.05      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | VENEZUELA MOB TELCEL | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | VENEZUELA            | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | VENEZUELA MOB        | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | VENEZUELA MOB TELCEL | 00:00:00 | 0.05      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | VENEZUELA            | 00:01:16 | 0.91      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | VENEZUELA MOB        | 00:01:16 | 0.91      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | VENEZUELA MOB TELCEL | 00:01:16 | 0.91      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | PERU                 | 00:00:03 | 0.06      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | PERU LIMA            | 00:00:03 | 0.06      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | PERU LIMA            | 00:00:03 | 0.06      |
+---------------------+-------+--------------------+----------------------+----------+-----------+
39 rows in set (0.00 sec)
i should get back 15 rows.

thanks,
Jason
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

could you post some data exports so I can build a local copy to fiddle with?
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

Post by jglicken »

Code: Select all

mysql> select calldate, src, dst, billsec  from cdr where src='erick' and dst like '011%'
    -> ;
+---------------------+-------+--------------------+---------+
| calldate            | src   | dst                | billsec |
+---------------------+-------+--------------------+---------+
| 2004-04-16 10:23:00 | erick | 0115114220165      |       3 |
| 2004-04-16 18:51:01 | erick | 011584148681837    |      76 |
| 2004-04-17 13:45:23 | erick | 011584142869237134 |       0 |
| 2004-04-17 13:48:21 | erick | 011584142869237134 |       0 |
| 2004-04-17 13:50:20 | erick | 011582869237134    |       0 |
| 2004-04-17 13:52:56 | erick | 011582869237134    |     104 |
| 2004-05-09 00:11:40 | erick | 011582869237134    |     198 |
| 2004-06-29 23:50:15 | erick | 011582869237134    |      51 |
| 2004-06-30 00:10:42 | erick | 011582869237134    |    1156 |
| 2004-07-03 13:46:01 | erick | 0115114229804      |     110 |
| 2004-07-03 13:47:34 | erick | 011582869237134    |      48 |
| 2004-07-27 10:46:45 | erick | 0115058885694      |       0 |
| 2004-07-27 10:51:13 | erick | 0115058885694      |       0 |
| 2004-07-27 10:52:23 | erick | 0115058885694      |       0 |
| 2004-07-27 10:52:52 | erick | 0115058885694      |       0 |
+---------------------+-------+--------------------+---------+
15 rows in set (0.07 sec)
above are pertinant rows from table cdr

Code: Select all

mysql> select * from rates where name like 'venezuela%';
+-------------+------------------------+------+-------------+
| destination | name                   | rate | connectCost |
+-------------+------------------------+------+-------------+
| 58          | VENEZUELA              | 0.68 | 0.05        |
| 58251       | VENEZUELA BARQUISIMETO | 0.68 | 0.05        |
| 58212       | VENEZUELA CARACAS      | 0.68 | 0.05        |
| 58261       | VENEZUELA MARACAIBO    | 0.68 | 0.05        |
| 584         | VENEZUELA MOB          | 0.68 | 0.05        |
| 5812        | VENEZUELA MOB          | 0.68 | 0.05        |
| 5814        | VENEZUELA MOB          | 0.68 | 0.05        |
| 5815        | VENEZUELA MOB          | 0.68 | 0.05        |
| 5816        | VENEZUELA MOB          | 0.68 | 0.05        |
| 5817        | VENEZUELA MOB          | 0.68 | 0.05        |
| 5818        | VENEZUELA MOB          | 0.68 | 0.05        |
| 5823        | VENEZUELA MOB          | 0.68 | 0.05        |
| 58415       | VENEZUELA MOB          | 0.68 | 0.05        |
| 58417       | VENEZUELA MOB DIGICEL  | 0.68 | 0.05        |
| 58412       | VENEZUELA MOB DIGITEL  | 0.68 | 0.05        |
| 58418       | VENEZUELA MOB INFONET  | 0.68 | 0.05        |
| 58416       | VENEZUELA MOB MOVILNET | 0.68 | 0.05        |
| 58414       | VENEZUELA MOB TELCEL   | 0.68 | 0.05        |
| 582         | VENEZUELA ROC          | 0.68 | 0.05        |
| 58241       | VENEZUELA VALENCIA     | 0.68 | 0.05        |
+-------------+------------------------+------+-------------+
20 rows in set (0.03 sec)
above are from table rates

do you need some more info?
just let me know
i appreciate all your help.

thanks
jason
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

Post by jglicken »

Code: Select all

select a.calldate, a.src, a.dst, b.name, sec_to_time(a.billsec) as billsec, format((a.billsec/60 * b.rate + b.connectCost), 2) totalcost from cdr a left join rates b on substring(a.dst,4) regexp (concat('<?/d+^', b.destination)) where src='erick' and dst like '011%' order by 'calldate' desc;
+---------------------+-------+--------------------+------+----------+-----------+
| calldate            | src   | dst                | name | billsec  | totalcost |
+---------------------+-------+--------------------+------+----------+-----------+
| 2004-07-27 10:52:52 | erick | 0115058885694      | NULL | 00:00:00 | NULL      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | NULL | 00:00:00 | NULL      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | NULL | 00:00:00 | NULL      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | NULL | 00:00:00 | NULL      |
| 2004-07-03 13:47:34 | erick | 011582869237134    | NULL | 00:00:48 | NULL      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | NULL | 00:01:50 | NULL      |
| 2004-06-30 00:10:42 | erick | 011582869237134    | NULL | 00:19:16 | NULL      |
| 2004-06-29 23:50:15 | erick | 011582869237134    | NULL | 00:00:51 | NULL      |
| 2004-05-09 00:11:40 | erick | 011582869237134    | NULL | 00:03:18 | NULL      |
| 2004-04-17 13:52:56 | erick | 011582869237134    | NULL | 00:01:44 | NULL      |
| 2004-04-17 13:50:20 | erick | 011582869237134    | NULL | 00:00:00 | NULL      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | NULL | 00:00:00 | NULL      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | NULL | 00:00:00 | NULL      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | NULL | 00:01:16 | NULL      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | NULL | 00:00:03 | NULL      |
+---------------------+-------+--------------------+------+----------+-----------+
15 rows in set (0.00 sec)
i think i am closer, but now i get NULL for name and totalcost?
i added '<?/d+^' to my regexp and get the correct number of results, but missing the 2 fields i need?

thanks
jason
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it didn't join..

the problem I'm finding is because some destinations match several of the same records you're looking at, it's getting included.

this seems to work with the data you posted:

Code: Select all

SELECT  DISTINCTROW b.destination, a.calldate, a.src, a.dst, b.name, sec_to_time( a.billsec )  AS billsec, format( a.billsec /60 * b.rate + b.connectCost, 2  ) totalcost
FROM cdr a
INNER  JOIN rates b ON a.dst
REGEXP concat(  '^',  '011', b.destination ) 
LEFT  JOIN rates c ON b.destination
REGEXP concat(  '^', c.destination )  AND b.destination != c.destination
WHERE src =  'erick' AND c.destination IS  NOT  NULL 
ORDER  BY  `calldate`  DESC , b.destination DESC
outputs

Code: Select all

+-------------+---------------------+-------+--------------------+----------------------+----------+-----------+
| destination | calldate            | src   | dst                | name                 | billsec  | totalcost |
+-------------+---------------------+-------+--------------------+----------------------+----------+-----------+
| 582         | 2004-07-03 13:47:34 | erick | 011582869237134    | VENEZUELA ROC        | 00:00:48 | 0.59      |
| 582         | 2004-06-30 00:10:42 | erick | 011582869237134    | VENEZUELA ROC        | 00:19:16 | 13.15     |
| 582         | 2004-06-29 23:50:15 | erick | 011582869237134    | VENEZUELA ROC        | 00:00:51 | 0.63      |
| 582         | 2004-05-09 00:11:40 | erick | 011582869237134    | VENEZUELA ROC        | 00:03:18 | 2.29      |
| 582         | 2004-04-17 13:52:56 | erick | 011582869237134    | VENEZUELA ROC        | 00:01:44 | 1.23      |
| 582         | 2004-04-17 13:48:21 | erick | 011582869237134    | VENEZUELA ROC        | 00:00:00 | 0.05      |
| 58414       | 2004-04-17 13:45:23 | erick | 011584142869237134 | VENEZUELA MOB TELCEL | 00:00:00 | 0.05      |
| 584         | 2004-04-17 13:45:23 | erick | 011584142869237134 | VENEZUELA MOB        | 00:00:00 | 0.05      |
| 58414       | 2004-04-16 18:51:01 | erick | 011584148681837    | VENEZUELA MOB TELCEL | 00:01:16 | 0.91      |
| 584         | 2004-04-16 18:51:01 | erick | 011584148681837    | VENEZUELA MOB        | 00:01:16 | 0.91      |
+-------------+---------------------+-------+--------------------+----------------------+----------+-----------+
10 rows in set (0.00 sec)
note that there are 2 extra rows in the results that you'll have to process out, because they matched multiple destinations..

I added b.destination only to the select to show you what it's finding..
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

Post by jglicken »

this is really good! but is their a way to do a once-only type match from right-to-left with mysql? so that once match is found starting from right it stops looking?
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

Post by jglicken »

actually, after looking over the results, the distinctrow will not work, because people call the same number more than once and this feature only uses one instance of each dst?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

they may call the same number more than once, but, each of the call times will be different. So they are distinct rows.
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

Post by jglicken »

I should get back only 15 results, but it does not seem to do the distinctrow based on calldate?

Code: Select all

mysql> select distinctrow a.calldate, a.src, a.dst, b.destination, b.name, sec_to_time(a.billsec) as billsec, format((a.billsec/60 * b.rate + b.connectCost), 2) totalcost from cdr a left join rates b on substring(a.dst,4) regexp (concat('^', b.destination)) where src='erick' and dst like '011%' order by 'calldate' desc;
+---------------------+-------+--------------------+-------------+----------------------+----------+-----------+
| calldate            | src   | dst                | destination | name                 | billsec  | totalcost |
+---------------------+-------+--------------------+-------------+----------------------+----------+-----------+
| 2004-07-27 10:52:52 | erick | 0115058885694      | 505         | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:52:52 | erick | 0115058885694      | 5058        | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:52:52 | erick | 0115058885694      | 50588       | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | 505         | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | 5058        | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:52:23 | erick | 0115058885694      | 50588       | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | 505         | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | 5058        | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:51:13 | erick | 0115058885694      | 50588       | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | 505         | NICARAGUA            | 00:00:00 | 0.05      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | 5058        | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-27 10:46:45 | erick | 0115058885694      | 50588       | NICARAGUA MOB        | 00:00:00 | 0.05      |
| 2004-07-03 13:47:34 | erick | 011582869237134    | 58          | VENEZUELA            | 00:00:48 | 0.59      |
| 2004-07-03 13:47:34 | erick | 011582869237134    | 582         | VENEZUELA ROC        | 00:00:48 | 0.59      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | 51          | PERU                 | 00:01:50 | 0.48      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | 5114        | PERU LIMA            | 00:01:50 | 0.48      |
| 2004-07-03 13:46:01 | erick | 0115114229804      | 51142       | PERU LIMA            | 00:01:50 | 0.48      |
| 2004-06-30 00:10:42 | erick | 011582869237134    | 58          | VENEZUELA            | 00:19:16 | 13.15     |
| 2004-06-30 00:10:42 | erick | 011582869237134    | 582         | VENEZUELA ROC        | 00:19:16 | 13.15     |
| 2004-06-29 23:50:15 | erick | 011582869237134    | 58          | VENEZUELA            | 00:00:51 | 0.63      |
| 2004-06-29 23:50:15 | erick | 011582869237134    | 582         | VENEZUELA ROC        | 00:00:51 | 0.63      |
| 2004-05-09 00:11:40 | erick | 011582869237134    | 58          | VENEZUELA            | 00:03:18 | 2.29      |
| 2004-05-09 00:11:40 | erick | 011582869237134    | 582         | VENEZUELA ROC        | 00:03:18 | 2.29      |
| 2004-04-17 13:52:56 | erick | 011582869237134    | 58          | VENEZUELA            | 00:01:44 | 1.23      |
| 2004-04-17 13:52:56 | erick | 011582869237134    | 582         | VENEZUELA ROC        | 00:01:44 | 1.23      |
| 2004-04-17 13:50:20 | erick | 011582869237134    | 58          | VENEZUELA            | 00:00:00 | 0.05      |
| 2004-04-17 13:50:20 | erick | 011582869237134    | 582         | VENEZUELA ROC        | 00:00:00 | 0.05      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | 58          | VENEZUELA            | 00:00:00 | 0.05      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | 584         | VENEZUELA MOB        | 00:00:00 | 0.05      |
| 2004-04-17 13:48:21 | erick | 011584142869237134 | 58414       | VENEZUELA MOB TELCEL | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | 58          | VENEZUELA            | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | 584         | VENEZUELA MOB        | 00:00:00 | 0.05      |
| 2004-04-17 13:45:23 | erick | 011584142869237134 | 58414       | VENEZUELA MOB TELCEL | 00:00:00 | 0.05      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | 58          | VENEZUELA            | 00:01:16 | 0.91      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | 584         | VENEZUELA MOB        | 00:01:16 | 0.91      |
| 2004-04-16 18:51:01 | erick | 011584148681837    | 58414       | VENEZUELA MOB TELCEL | 00:01:16 | 0.91      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | 51          | PERU                 | 00:00:03 | 0.06      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | 5114        | PERU LIMA            | 00:00:03 | 0.06      |
| 2004-04-16 10:23:00 | erick | 0115114220165      | 51142       | PERU LIMA            | 00:00:03 | 0.06      |
+---------------------+-------+--------------------+-------------+----------------------+----------+-----------+
39 rows in set (2.34 sec)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

only exact duplicate rows are removed.. you don't have that as you have destination in there, and name changes as well.
jglicken
Forum Newbie
Posts: 22
Joined: Mon Jul 26, 2004 9:58 am

Post by jglicken »

do you have any suggestions?
Post Reply