Hi, all:
I have two tables one is a lookup for all the tasks, another table stores the next task for each task, I want to generate a list of tasks with its sequence number, can I do it in one query?
Table task
id name
1 postoffice
2 grocery store
3. walk dog
4. swimming
5 roller skate
7 biking
table next_task
task next_task
3 7
7 1
1 4
4 2
2 5
and I want to get the list in order
task task_order
3 (walk dog) 1
7 (biking) 2
1 (postoffice) 3
4 (swimming) 4
2 (growcery store) 5
5 (roller skate) 6
It might be just very simple and I have tried but somehow I am blocked.
Thanks in advance
-Rockdale