Something like this should work:
select t.name cat, p.name parent
from wp_terms t, wp_term_taxonomy tt, wp_terms p
where tt.term_id=t.term_id and tt.parent=p.term_id
(this only returns categories with a parent)
Something like this should work:
select t.name cat, p.name parent
from wp_terms t, wp_term_taxonomy tt, wp_terms p
where tt.term_id=t.term_id and tt.parent=p.term_id
(this only returns categories with a parent)