zoukankan      html  css  js  c++  java
  • 记录一些sql,怕忘了

    SELECT business_line,count(*) FROM zc_db.t_bug group by business_line;

    这个是展示的,显示某一项一共有多少个xxx,注意是group by

    select DISTINCT `status` from t_bug WHERE create_time BETWEEN '2017-06-13 16:00:00' and '2017-06-15 23:59:00'

    这个是看这一段日期内的问题的存在的所有状态。

    select t_bug.id,t_bug.channel ,bug_type,`desc`,step_to_string,model,version,t_device.platform,network
    from t_bug join t_detail on t_bug.id = t_detail.bug_id join t_device on t_bug.id = t_device.bug_id
    where t_bug.id = t_bug.repeat_id and t_bug.id in(
      select bug_id from t_level where `type` = 'P3') and t_bug.create_time between '2017-06-13 16:00:00' and '2017-06-15 23:59:00'

    这个就很骚,并且没有用表的缩写,比较长。

    感觉sql真是一个,非常让人感到博大精深的东西。

  • 相关阅读:
    Qt 去除控件边框线
    Qt 自定义可编辑 模型视图
    Qt double类型输出问题
    vue实例
    初识vue
    python中的数据类型
    python 列表解析式
    Goland常用快键键 mac pro
    文档对象模型DOM
    正则表达式
  • 原文地址:https://www.cnblogs.com/wzben/p/7152138.html
Copyright © 2011-2022 走看看