Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Consider a Phone Log table as below. It records all phone numbers that we dial in a given day.




SOURCE_PHONE_NUMBER
DESTINATION_PHONE_NUMBER
CALL_START_DATETIME
1234
4567
01/07/2011 10:00
1234
2345
01/07/2011 11:00
1234
3456
01/07/2011 12:00
1234
3456
01/07/2011 13:00
1234
4567
01/07/2011 15:00
1222
7890
01/07/2011 10:00
1222
7680
01/07/2011 12:00
1222
2345
01/07/2011 13:00




Please provide an SQL query to display the source_phone_number and a flag where the flag needs to be set to Y if first called number and last called number are the same and N if the first called number and last called number are different.




Desired Output:




Source Number
Is_Match
1222
N
1234
Y

Answers were Sorted based on User's Feedback



Consider a Phone Log table as below. It records all phone numbers that we dial in a given day. ..

Answer / jd

this can be done using FIRST_VALUE() AND LAST_VALUE()

check the below link for more information

http://netezzamigration.blogspot.com/2014/10/lastvalue-and-firstvalue-best-example.html

Is This Answer Correct ?    2 Yes 1 No

Consider a Phone Log table as below. It records all phone numbers that we dial in a given day. ..

Answer / kivi

first value and last value...

for more info ref 

http://etltechsolutions.wordpress.com/2014/10/12/last_value-and-first_value-best-example/

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Informatica Interview Questions

write a query to get maximum salary from the employers table without duplicates....kindly help me

5 Answers   CTS,


How will you display 10-15 letters from a name? (for ex: name="sivasubram'aniam'ramakrishnan". o/p wanted="aniam")

4 Answers  


If we are using an aggregator but forget to mention the group by port .what will be the output??

11 Answers   Nomura, TCS,


Explain what are the different versions of informatica?

0 Answers  


hi guys i have an question how do you find out weather the column is numeric or combination of char and numbers or it contains char,numeric and special characters.

2 Answers   IBM,


Describe the impact of several join conditions and join order in a joiner transformation?

0 Answers  


What are the types of caches in lookup? Explain them.

0 Answers  


can session assigned multiple mappings or not?

2 Answers   Zensar,


I have Flat file like the data, sal have 10,000. I want to load the data in the same format as sal as 10,000. Can anybody know the answer means please mail me. Thanks in advance.. My mail id is chandranmca2007@gmail.com

2 Answers   DELL, iGate,


empno sal 1 8000 2 9000 3 8000 4 1000 how to get highest sal wise rankings in rank t/r.

3 Answers  


Session Recovery. 1000 rows in the source of which 500 passed through and then I killed the session. Can you perform a recovery and how

1 Answers   IBM,


How many ways you create ports?

1 Answers  


Categories