MySQL request
Dear all
I have one table which contains 4 fields
-serie which is an autoincrement(THE KEY)
-dest which contains a telephone prefix: this field is stored like varchar(40) its length can be one or 40 DIGITS
-col1, COL2, col3 which they are float
We have in the following example
The aim is to agregate/summarize this table by reducing the lines according to the 3 last columns and the prefixe of course. For rexample the following lines
will be reduced to 2 lines
because all prefixes start by 125. Even 50 1250 0,0052 0,0035 0,0076 starts by '125' BUT 0,0052 0,0035 0,0076 are not equal (one by one) to 0,0102 0,005 0,007 My question is how to make this task in MySQL (by the MySQL requests) Many THanks
47 1246 0,123729 0,1495 0,0885
48 1248 0,0102 0,005 0,007
49 1249 0,0052 0,0035 0,0076
50 1250 0,0052 0,0035 0,0076
51 1251 0,0102 0,005 0,007
52 1252 0,0102 0,005 0,007
53 1253 0,0102 0,005 0,007
54 1254 0,0102 0,005 0,007
55 1256 0,0102 0,005 0,007
56 1260 0,0102 0,005 0,007
57 1262 0,0102 0,005 0,007
58 1264 0,053023 0,1638 0,06
59 1267 0,0102 0,005 0,007
60 1268 0,145631 0,0946 0,1045
61 1269 0,0102 0,005 0,007
62 1270 0,0102 0,005 0,007The aim is to agregate/summarize this table by reducing the lines according to the 3 last columns and the prefixe of course. For rexample the following lines
50 1250 0,0052 0,0035 0,0076
51 1251 0,0102 0,005 0,007
52 1252 0,0102 0,005 0,007
53 1253 0,0102 0,005 0,007
54 1254 0,0102 0,005 0,007
55 1256 0,0102 0,005 0,007will be reduced to 2 lines
50 1250 0,0052 0,0035 0,0076
5025 125 0,0102 0,005 0,007 because all prefixes start by 125. Even 50 1250 0,0052 0,0035 0,0076 starts by '125' BUT 0,0052 0,0035 0,0076 are not equal (one by one) to 0,0102 0,005 0,007 My question is how to make this task in MySQL (by the MySQL requests) Many THanks
-
Is there some sort of issue with your cPanel? I don't see it here. 0 -
Hello :) You may receive more user input on this type of question directly on the MySQL forums: [url=http://forums.mysql.com/]MySQL :: MySQL Forums Thank you. 0
Please sign in to leave a comment.
Comments
2 comments