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

We can't use sql override or other properties when using Flat file as source. Then what is the use of Source Qualifier transformation?

3 Answers  


What if the source is a flat-file?

0 Answers  


Hi, This is Lakshmi,Anyone taking classes for datawarehouse-Informatica and BO with real time project

2 Answers  


What is primary and backup node?

0 Answers  


What are variable ports and list two situations when they can be used?

1 Answers  


Which transformation should we use to normalize the COBOL and relational sources?

4 Answers   DELL, IBM, Lehman Brothers,


what are the difference between Informatica 7.1 and 8.1?

6 Answers  


To Provide Support For Mainframes Source Data, which Files Are Used As A Source Definitions?

0 Answers   Informatica,


How to generate a single mapping for both the historical and incremental load.

2 Answers   CSC, TATA,


Do joiner transformation use cache? If so describe?

2 Answers   Patni,


What are the informatica performance improvement tips

0 Answers   Informatica,


How i can upload the MainFrame source For Informatica ?

1 Answers  


Categories