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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is xml source qualifier transformation in informatica?

1217


Give some information on report bursting and how to do it in bca as I have to split the report and send different reports to different people?

1086


How to create the source and target database connections in server manager?

1090


What are the transformations that are not supported in mapplet?

1032


What are active transformations.

1656


What is flashback table ? Advance thanks

1942


I have three same source structure tables. But, I want to load into single target table. How do I do this? Explain in detail through mapping flow.

1279


What all are steps in up gradation of Informatica server?

1045


how lookup transformation is made active in new versions... When to use connected and when to use unconnected lookup and why? which is good for session performance. How to make lookup persistent and how to remove stale data from that lookup. how commit works - when we stop or abort data. Explain in both cases. What is factless fact table and have you ever used it in real time scenarios.

1688


explain about unit testing? in real time?

2205


expain about the tune parameters?

2414


How can we use mapping variables in informatica? Where do we use them?

1203


In what scenario we use to improve session performance by pushdown optimization?can any one give example?

6181


What do you understand by SOA of Informatica?

992


What differs when we choose the sorted input for aggregator transformation?

1025