adspace


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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you remove duplicate records in informatica? And how many ways are there to do it?

1241


What is dimensional table?

1174


Write the unconnected lookup syntax?

1161


Hello, Can you please send the admin and advanced mapping design sample questions to ns_sharmin@yahoo.com?

2425


Explain scd type 3 through mapping.

1083


Write the unconnected lookup syntax and how to return more than one column.

1178


can anybody send me some real time screenshots of mapping in informatica powercenter. i will be vary thankful to him. my e-mail id :- prakashkumar.kumhar@gmail.com

4801


What is dimensional table? Explain the different dimensions.

1274


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

1148


How do you load first and last records into target table? How many ways are there to do it? Explain through mapping flows.

1207


Explain in detail about scd type 1 through mapping.

1655


draw informatica architecture 8.6 ?

3956


How do you load more than 1 max sal in each department through informatica or write sql query in oracle?

1678


Name at least 5 different types of transformations used in mapping design and state the use of each.?

1218


Hi all , I am planning for informatica S - PowerCenter 8 Mapping Design certification. I have rewuired the dumps for the same. if anyone of you having the same pl. share it with me. This will be of great help. My contact is : sagardev7@gmail.com TIA , Sagar

2833