zoukankan      html  css  js  c++  java
  • kfrobotaidlog查找

     

     

    ======查看最新的大于6的数量==========

     

    select c.questionid from

    (select a.questionid, b.clientQuestion from

    similarquestion a inner join kfrobotaidlog b

    on a.question=b.question

    where b.questionUid is not null

    union

    select questionid,question from similarquestion) c

    group by c.questionid having count(c.questionid)>6

     

    使用问题标题去查找,避免因为问题进行了合并而导致丢失

    后续等问题库大致完善了,再根据questionid去整合

     

     

    ========完整版=========

     

     

    select d.questionid,d.clientQuestion from

     

    (select a.questionid, b.clientQuestion from

     

    similarquestion a inner join kfrobotaidlog b

     

    on a.question=b.question

     

    where b.questionUid is not null

     

    union            #有进行去重

     

    select questionid, question from similarquestion) d

     

    where char_length(d.clientQuestion)>2 and  d.questionid in   #问题长度要大于2,避免出现只有一个词的,不准确对应的情况。

     

    (select c.questionid from

     

    (select a.questionid, b.clientQuestion from

     

    similarquestion a inner join kfrobotaidlog b

     

    on a.question=b.question

     

    where b.questionUid is not null

     

    union

     

    select questionid,question from similarquestion) c

     

    group by c.questionid having count(c.questionid)>6)

     

  • 相关阅读:
    ParamCount、ParamStr
    写一个可拖动的 TShape 回复 "韦韦" 的问题
    读十六进制文本到 Btye 数组的函数 回复 "峰哥!!!" 的问题
    网站速度优化
    [新功能]新增分类浏览页面
    [CN.Text开发笔记]嵌套Repeater的问题
    中秋祝福
    10 Golden rules for publishing your blog
    HttpCompressionModule 6的一个Bug及使用效果
    [CN.Text开发笔记]OnInit与运行期数据绑定
  • 原文地址:https://www.cnblogs.com/yjybupt/p/10370046.html
Copyright © 2011-2022 走看看