<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ### 10.2、在from語句中使用子查詢,可以將該子查詢看做一張表 l 查詢員工信息,查詢哪些人是管理者,要求顯示出其員工編號和員工姓名 首先取得管理者的編號,去除重復的 ``` select distinct mgr from emp where mgr is not null; ``` 將以上查詢作為一張表,放到from語句的后面 ``` 使用92語法: select e.empno, e.ename from emp e, (select distinct mgr from emp where mgr is not null) m where e.empno=m.mgr; 使用99語法: select e.empno, e.ename from emp e join (select distinct mgr from emp where mgr is not null) m on e.empno=m.mgr; ``` ![](https://img.kancloud.cn/67/97/6797f87c5bdfc8085b139928ead09158_649x223.png) l 查詢各個部門的平均薪水所屬等級,需要顯示部門編號,平均薪水,等級編號 實現思路 1、首先取得各個部門的平均薪水 ``` select deptno, avg(sal) avg_sal from emp group by deptno; ``` ![](https://img.kancloud.cn/c0/64/c0643fc3a4dc4ae0df89ccd0e4456894_548x155.png) 2、將部門的平均薪水作為一張表與薪水等級表建立連接,取得等級 ``` select deptno,avg(sal) avg_sal from emp group by deptno; ``` ``` select * from salgrade; ``` ``` select a.deptno,a.avg(sal),g.grade from (select deptno,avg(sal) avg_sal from emp group by deptno ) a join salgrade g on a.avg(sal) between g.losal and hisal; ``` ![](https://img.kancloud.cn/1b/81/1b81fd7fb04f0daaed1e3129ede30edf_673x531.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看