我正在检索给定page_title的类别列表,但结果包括以下类别:
“All_articles_to_be_split”
“Articles_with_unsourced_statements_from_July_2008”
“All_articles_with_specifically-marked_weasel-worded_phrases”
......等等......我希望省略这些用于维护的类别。
这是我正在制作的一个示例sql调用:
SELECT categorylinks.cl_to
FROM categorylinks
JOIN page ON categorylinks.cl_from = page.page_id
AND page.page_namespace = 0
AND page.page_title = "Ice_hockey";
我的查询中缺少什么来省略维护类别?或者我是否必须手动解析这些结果?感谢。
答案 0 :(得分:0)
我只是这样手动完成:
SELECT categorylinks.cl_to
FROM categorylinks
JOIN page ON categorylinks.cl_from = page.page_id
AND page.page_namespace = 0
AND cl_to NOT LIKE '%Article%'
AND cl_to NOT LIKE '%article%'
AND cl_to NOT LIKE '%Wikipedia%'
AND cl_to NOT LIKE '%redirect%'
AND cl_to NOT LIKE '%page%'
AND cl_to NOT LIKE '%Redirect%'
AND page.page_title = "Ice_hockey";