Home » SQL & PL/SQL » SQL & PL/SQL » POSTPAID TO PREPIAD TRAFFIC
POSTPAID TO PREPIAD TRAFFIC [message #198195] Mon, 16 October 2006 02:35 Go to next message
deni_sa
Messages: 77
Registered: June 2006
Member
HELLO I NEED TO SEE THE TRAFFIC FROM POSTPAID TO PREPAID .


MTC FROM POST TOP PREPAID

SELECT COUNT(uds_record_id), SUM(duration_volume)/60,sum(rounded_volume)/60 tariff_info_tmcode
FROM UDR_JAN_2006
WHERE (call_type=2 AND xfile_ind='H')
AND (o_p_number_address LIKE '3556820%'
OR o_p_number_address LIKE '6820%'
OR o_p_number_address LIKE '06820%'
OR o_p_number_address LIKE '003556820%')
AND (o_p_number_address LIKE '3556840%'
OR o_p_number_address LIKE '6840%'
OR o_p_number_address LIKE '06840%'
OR o_p_number_address LIKE '003556840%')
AND( s_P_NUMBER_addres like '6821%'or s_P_NUMBER_addres like '6822%' or s_P_NUMBER_addres like '6821%') ect

who can help me build this query please ?

Re: POSTPAID TO PREPIAD TRAFFIC [message #198207 is a reply to message #198195] Mon, 16 October 2006 03:19 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
No create tables, (not even any table descriptions), no insert statements, (not even any Selects of data), nothing showing what the problem is, nothing showing what the results need to look like.

Typing this reply seems to have involved me putting in more effort thant the OP did, so that's about all the help they're getting for the moment.
Re: POSTPAID TO PREPIAD TRAFFIC [message #198211 is a reply to message #198207] Mon, 16 October 2006 03:25 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Now you sound like Forrest Gump while talking about war in Vietnam http://www.orafaq.com/forum/fa/1587/0/
Re: POSTPAID TO PREPIAD TRAFFIC [message #198212 is a reply to message #198207] Mon, 16 October 2006 03:31 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
Nr.Of Calls Duration( min) Amount , so the traffic from postpaid nr(that begins with 06820...and with 06840...)to all prepaid nr which are all the number from 06821...to 06834....
S-p number is the number from wich the calls goes out the op_number is the number where the call terminate.
Re: POSTPAID TO PREPIAD TRAFFIC [message #198217 is a reply to message #198212] Mon, 16 October 2006 03:50 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
and that is supposed to make things clearer?

I'd say The Answer is 42.

Tip: provide create table scripts and some insert statements for sample data. Then try to describe your problem like we are really stupid and know nothing about what your daily business is. Show what output you get and what you want.
And don't forget to use [code]..[/code] tags
Re: POSTPAID TO PREPIAD TRAFFIC [message #198232 is a reply to message #198212] Mon, 16 October 2006 04:24 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
I dont understand what do you really want .
Re: POSTPAID TO PREPIAD TRAFFIC [message #198234 is a reply to message #198195] Mon, 16 October 2006 04:25 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
...to know exactly
Re: POSTPAID TO PREPIAD TRAFFIC [message #198245 is a reply to message #198234] Mon, 16 October 2006 04:56 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Something like this:
CREATE TABLE UDR_JAN_2006 (col1 NUMBER, col2 blabla);

INSERT INTO udr_jan_2006 VALUES (1, 'asdf', ...);
INSERT INTO udr_jan_2006 VALUES (6, 'iowuer', ...);
I have this
SELECT lksdf, wlek, lsfi 
FROM udr_jan_2006
WHERE laksjf < 234
  AND jklsdf between ...

lksdf wlek
----- ----
4444  A
3303  02D
2020  DD0
4040
but I'd like to get this
lskdj
-----
4040
2020
3303
4444

icon8.gif  Re: POSTPAID TO PREPIAD TRAFFIC [message #198270 is a reply to message #198245] Mon, 16 October 2006 06:23 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
well i want the nr of calls and the duration in min to all calls made from postpaid nr to prepaid .I have alredy the tables , i want to build a query that generates the traffic

100 calls 123 min ---> to prepaid numbres.


another query that i tried
SELECT COUNT(uds_record_id), SUM(duration_volume)/60,SUM(rounded_volume)/60
FROM UDR_sep_2006 ,MPUZpTAB
WHERE (call_type=1 AND xfile_ind='H')
AND tariff_info_zncode = zpcode
AND zpcode='2'
AND (o_p_number_address NOT LIKE '3556820%'
OR o_p_number_address NOT LIKE '6820%'
OR o_p_number_address NOT LIKE '06820%'
OR o_p_number_address NOT LIKE '003556820%')
AND (o_p_number_address NOT LIKE '3556840%'
OR o_p_number_address NOT LIKE '6840%'
OR o_p_number_address NOT LIKE '06840%'
OR o_p_number_address NOT LIKE '003556840%')



call_type =1 ---> mobile originated call
zpcode= 2 are calls in the same operatore , vodaphone to vodaphone ...the O-P number add ...are prepaid numbers.
I dont know how to explainit Sad(
Re: POSTPAID TO PREPIAD TRAFFIC [message #198272 is a reply to message #198270] Mon, 16 October 2006 06:26 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You mayhave the tables, but we don't.
Therefore our ability to look at your data structure and work out :
a) what your query is doing wrong
b) how to fix it

is severely limited.
@Littlefoot gave you a good example of what we'd like to see.

Re: POSTPAID TO PREPIAD TRAFFIC [message #198273 is a reply to message #198272] Mon, 16 October 2006 06:29 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
What should i do i this case??!!
Re: POSTPAID TO PREPIAD TRAFFIC [message #198274 is a reply to message #198273] Mon, 16 October 2006 06:35 Go to previous messageGo to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
desc <table name>

select * from <table name>

do this on your sql prompt and show us the display..then please let us know what you want
Re: POSTPAID TO PREPIAD TRAFFIC [message #198275 is a reply to message #198274] Mon, 16 October 2006 06:37 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
Ok leave it , i have said it so many times what i want. The table is very big .
Thank you any way
Have a nice day to you all guys, bye D.
Re: POSTPAID TO PREPIAD TRAFFIC [message #198276 is a reply to message #198274] Mon, 16 October 2006 06:37 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
No amul, that is not correct.
Provide create table scripts and insert scripts.
It is much more effort for us to create the scripts from a desc and select * from..
Put that effort in yourself please!

(and, amul, please remember this for your own posts as well Wink)
Re: POSTPAID TO PREPIAD TRAFFIC [message #198279 is a reply to message #198275] Mon, 16 October 2006 06:43 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
@deni_sa
So sorry to see you leave. Maybe I can give you an example to explain why we were asking what we did:

Suppose I come here asking the following:
Please help me, I have to go from my home to my girlfriends home. I tried taking a left turn.

First question you would ask is "Please explain some more; where do you live, where does your girlfriend live, do you go by car, what exactly did you try and where did you fail"
See? We are definitely NOT trying to be picky, but you have to realize that maybe YOU work with your tables and data all day, to us it is totally unknown what every column means etc.
Re: POSTPAID TO PREPIAD TRAFFIC [message #198283 is a reply to message #198279] Mon, 16 October 2006 06:46 Go to previous messageGo to next message
deni_sa
Messages: 77
Registered: June 2006
Member
Please tell me how can i show you all the data ? it has a lot of...i send you the queries ...and wat i wanted to ask if the syntax was ok ? But really thank you for trying to help me all day long but i dont know how to explain more than i have just said .
Re: POSTPAID TO PREPIAD TRAFFIC [message #198287 is a reply to message #198283] Mon, 16 October 2006 06:51 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Can you show your current output and your desired output based on just a couple of records?
Create insert-statements for those and run your query against it.
Copy-paste the outcome of that and tell us what you want different. We will see if we need more information.

If you put [code] before your output and your sql and [/code] after it, it becomes more readable.
icon14.gif  Re: POSTPAID TO PREPIAD TRAFFIC [message #198310 is a reply to message #198195] Mon, 16 October 2006 09:24 Go to previous message
deni_sa
Messages: 77
Registered: June 2006
Member
hey guys i find the solution ...thank you very much for your time
have a nice day
Deni
Previous Topic: Confusion in SQL Query
Next Topic: co-related query
Goto Forum:
  


Current Time: Fri Dec 09 23:05:58 CST 2016

Total time taken to generate the page: 0.13607 seconds