Skip to content

Instantly share code, notes, and snippets.

@chrisarusso
Last active August 29, 2015 14:10
Show Gist options
  • Save chrisarusso/9c5d687e06403c4f13f7 to your computer and use it in GitHub Desktop.
Save chrisarusso/9c5d687e06403c4f13f7 to your computer and use it in GitHub Desktop.
mysql> select tv.name as Vocab, ttd.name as Term_name, ti.nid from taxonomy_vocabulary tv, taxonomy_term_hierarchy tth, taxonomy_term_data ttd, taxonomy_index ti where ti.tid = ttd.tid and ttd.tid = tth.tid and tv.vid = ttd.vid and tth.parent = 0 and tv.vid = 11;
+---------+----------------------------+------+
| Vocab | Term_name | nid |
+---------+----------------------------+------+
| Sectors | Consumer Discretionary | 1436 |
| Sectors | Consumer Staples | 1436 |
| Sectors | Energy | 1436 |
| Sectors | Financials | 1436 |
| Sectors | Health Care | 1436 |
| Sectors | Industrials | 1436 |
| Sectors | Information Technology | 1436 |
| Sectors | Materials | 1436 |
| Sectors | Telecommunication Services | 1436 |
+---------+----------------------------+------+
9 rows in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment