Hello Frndz,
I have a table named product as shown below:
product_id product_name
1 AAA
1 BBB
1 CCC
2 PPP
2 QQQ
2 RRR

Now my output should be:
product_id product_name_1 product_name_2 product_name_3
1 AAA BBB CCC
2 PPP QQQ RRR

Answer Posted / vaishnavi a

Thanks for ur response, i just gave a sample table with few
records, but in a real time scenario we have a table with
duplicates & there can be many products under a particular
prod_id.It is not that there should be only 3 products
under a prod_id , it could be even 50. wat could be an
optimised way of writing a query for this scenario??

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the functions of a Parser?

616


How to explain project Architecture and flow in teradata interviews?Can please anyone help on this? Am new to teradata.

3914


What do you mean by caching in teradata?

611


What is the meaning of Caching in Teradata?

695


Explain fallback in teradata?

612






Describe primary index in teradata?

591


tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you

380


What can be achieved by using the teradata rdbms?

629


Explain the advantages of partitioned primary index in a query?

567


Explain teradata architecture?

638


How can bottlenecks be identified?

587


How to Extract data from multiple legacy systems?

576


In the Primary Index, what is the score of AMPs that are actively involved?

580


i learn teradata,it is so intersting,now i want teradata certifications ,so any 1 help me to get teradata certifications TD 12 ? email:kdcrazyy@gmail.com

1775


If Fast Load Script fails and only the error tables are made available to you, then how will you restart?

637