Advertisement
Guest User

Example ISFDB query

a guest
Mar 14th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. MariaDB [isfdb]> select tag_name, count(1) c from pubs p left outer join pub_content pc on pc.pub_id = p.pub_id left outer join tag_mapping tm on tm.title_id = pc.title_id left outer join tags t on t.tag_id = tm.tag_id where pub_year >= '2018-10-01' and pub_year <= '2018-12-31' and (pub_ctype = 'NOVEL' or pub_ctype = 'CHAPBOOK') group by tag_name order by c desc limit 10;
  2. +---------------------+------+
  3. | tag_name | c |
  4. +---------------------+------+
  5. | NULL | 1985 | <-- This being the most common shows that most 2018Q4 novels/novellas haven't had a (sub)genretag
  6. | young-adult fantasy | 262 |
  7. | juvenile fantasy | 260 |
  8. | fantasy | 235 |
  9. | science fiction | 181 |
  10. | paranormal romance | 160 |
  11. | horror | 146 |
  12. | urban fantasy | 135 |
  13. | young-adult sf | 111 |
  14. | historical fantasy | 104 |
  15. +---------------------+------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement