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

Name the different lookup cache(s)?

1233


How can we handle two sessions in informatica?

1032


Explain why we use partitioning the session in informatica?

1090


How to update or delete the rows in a target, which do not have key fields?

1178


In warehouses how many schemas are there?

1073


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

1021


Hi friends I want to know about what r the dimensions in the banking porjects and genarally how many tables r in project ?

1901


How many input parameters can exist in an unconnected lookup?

1545


What do mean by local and global repository?

1226


The question was on time stamp. what is the difference between HH and HH24 when to use when.

2055


How do you take back up of repository?

1160


Target increases every day even though no new record was inserted

1580


What is informatica etl tool?

998


What is mapplet in informatica?

1057


Which development components of informatica have the highest usage?

1041