Need query that displays parents, grandparents, etc.

Sep 15th, 2014
SKTFaker
Category:
Programming
Price: $20 USD

Question description

I posted this question on StackOverflow but never got a reply...

http://stackoverflow.com/questions/25677390/modifying-query-to-recognize-children?noredirect=1#comment40161986_25677390

I put the following resources online:

http://sqlfiddle.com/#!2/892ba

http://www.geobop.org/test/test-gs.php

http://www.geobop.org/test/test-gs-planimals.php

http://www.geobop.org/test/test-gw-geog.php

Very briefly, the table gs contains the names of symbols, like the United States' national mammal, the bison (Bison bison), derived from the fields gs.Symbol (bison) and gs.Latin (Bison-bison).

All the plant and animal symbols contained in the table gs are also found in the table gs_planimals, which also includes their parents, grandparents, etc. In other words, it's a taxonomic ranking of the animal kingdom.

So here's the problem: I can display a list of U.S. state birds or Canadian flower symbols, derived from the table gs only. Or I can display an identical list derived from the table gs_planimals. But if I want to also display the symbols' parents and grandparents, I'm stuck. I can either display ALL higher taxons or no higher taxons.

The bison's parent and grandparent are Bison and Bovidae, neither of which are contained in the table gs. Therefore, I have no way of recognizing them as part of a particular flow of data.

Someone at StackOverflow told me what I want to do can be done, but he then disappeared. ;)

Thank you.


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Duke University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

7 Reviews


Summary
Quality
Communication
On Time
Value
kpcutie
Dec 3rd, 2016
" Excellent job "
Hemapathy
Nov 20th, 2016
" all I can say is wow very fast work, great work thanks "
BlueOcean
Nov 6th, 2016
" Awesome! Exactly what I wanted. "
kevin12622
Oct 28th, 2016
" Goes above and beyond expectations ! "
ashleyisgod
Oct 15th, 2016
" Top quality work from this guy! I'll be back! "
likeplum4
Oct 6th, 2016
" Excellent work as usual "
Molly_Moon
Sep 22nd, 2016
" AMAZING as always! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1828 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors