A SQL Training

Поиск
Список
Период
Сортировка
От Devrim GUNDUZ
Тема A SQL Training
Дата
Msg-id Pine.LNX.4.44.0207161957450.30332-100000@oper.metu.edu.tr
обсуждение исходный текст
Ответы Re: A SQL Training
Re: A SQL Training
Список pgsql-sql
Hi,

Today, one of my teacher asked me a question for a practice... I could not 
solve it :)

Here it comes:

We are given the name of the grandfather in a family. Let's call him A. A 
has n sons, each son has children .

for example.      A -> Grandfather         / \        /   \             B     C      /\   / \ \              /  \ D  E
F          G   H               ...
 

We are given the data like ('A','B'),('C','D')...

Now, we do not know how many children are in the list. How could we list 
this family tree in "tree" formt by only using SQL?

Best regards.





-- 

Devrim GUNDUZ

devrim@oper.metu.edu.tr
devrim.gunduz@linux.org.tr

Web : http://devrim.oper.metu.edu.tr
-------------------------------------





В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Indexing UNIONs
Следующее
От: Kevin Brannen
Дата:
Сообщение: datatype matrix (was: Re: Sorry..)