久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <bdo id='wzqwE'></bdo><ul id='wzqwE'></ul>
    <tfoot id='wzqwE'></tfoot>
    1. <i id='wzqwE'><tr id='wzqwE'><dt id='wzqwE'><q id='wzqwE'><span id='wzqwE'><b id='wzqwE'><form id='wzqwE'><ins id='wzqwE'></ins><ul id='wzqwE'></ul><sub id='wzqwE'></sub></form><legend id='wzqwE'></legend><bdo id='wzqwE'><pre id='wzqwE'><center id='wzqwE'></center></pre></bdo></b><th id='wzqwE'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wzqwE'><tfoot id='wzqwE'></tfoot><dl id='wzqwE'><fieldset id='wzqwE'></fieldset></dl></div>
      <legend id='wzqwE'><style id='wzqwE'><dir id='wzqwE'><q id='wzqwE'></q></dir></style></legend>

      <small id='wzqwE'></small><noframes id='wzqwE'>

        需要使用兩個不同的 where 子句返回兩組數據

        need to return two sets of data with two different where clauses(需要使用兩個不同的 where 子句返回兩組數據)
        • <bdo id='jzsN0'></bdo><ul id='jzsN0'></ul>

            <small id='jzsN0'></small><noframes id='jzsN0'>

              <legend id='jzsN0'><style id='jzsN0'><dir id='jzsN0'><q id='jzsN0'></q></dir></style></legend>
              <i id='jzsN0'><tr id='jzsN0'><dt id='jzsN0'><q id='jzsN0'><span id='jzsN0'><b id='jzsN0'><form id='jzsN0'><ins id='jzsN0'></ins><ul id='jzsN0'></ul><sub id='jzsN0'></sub></form><legend id='jzsN0'></legend><bdo id='jzsN0'><pre id='jzsN0'><center id='jzsN0'></center></pre></bdo></b><th id='jzsN0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jzsN0'><tfoot id='jzsN0'></tfoot><dl id='jzsN0'><fieldset id='jzsN0'></fieldset></dl></div>
            1. <tfoot id='jzsN0'></tfoot>
                <tbody id='jzsN0'></tbody>

                • 本文介紹了需要使用兩個不同的 where 子句返回兩組數據的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一張記錄交易記錄的表格.

                  I have a table that keeps track of transactions.

                  表格設置為:

                  transactions:
                  
                  id, account_id, budget_id, points, type
                  

                  我需要返回每個budget_id 的點總和,其中type = 'allocation' 和點總和,其中type = 'issue'

                  I need to return each budget_id's sum of points where type = 'allocation' and sum of points where type = 'issue'

                  我知道如何在一個查詢中執行每個操作,但不能同時執行.

                  I know how to do each, but not both in one query.

                  預期結果集:

                  budget_id   allocated   issued
                     434       200000      100
                     242       100000      5020
                     621       45000       3940
                  

                  推薦答案

                  SELECT budget_id, 
                         SUM(IF(type = 'allocation', points, 0)) AS allocated,
                         SUM(IF(type = 'issue', points, 0)) AS issued
                  FROM transactions
                  GROUP BY budget_id
                  

                  這篇關于需要使用兩個不同的 where 子句返回兩組數據的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)
                  <i id='Z8T88'><tr id='Z8T88'><dt id='Z8T88'><q id='Z8T88'><span id='Z8T88'><b id='Z8T88'><form id='Z8T88'><ins id='Z8T88'></ins><ul id='Z8T88'></ul><sub id='Z8T88'></sub></form><legend id='Z8T88'></legend><bdo id='Z8T88'><pre id='Z8T88'><center id='Z8T88'></center></pre></bdo></b><th id='Z8T88'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Z8T88'><tfoot id='Z8T88'></tfoot><dl id='Z8T88'><fieldset id='Z8T88'></fieldset></dl></div>

                  • <bdo id='Z8T88'></bdo><ul id='Z8T88'></ul>

                      <tfoot id='Z8T88'></tfoot>
                        <tbody id='Z8T88'></tbody>
                    1. <small id='Z8T88'></small><noframes id='Z8T88'>

                          <legend id='Z8T88'><style id='Z8T88'><dir id='Z8T88'><q id='Z8T88'></q></dir></style></legend>
                            主站蜘蛛池模板: 亚洲人成人一区二区在线观看 | 国产精品成人一区二区三区 | 国产成人在线观看免费 | 日韩毛片在线免费观看 | 久久久91精品国产一区二区三区 | 日韩二三区 | 亚洲免费视频在线观看 | 久久亚洲天堂 | 中文字幕在线一区二区三区 | 日本欧美视频 | 亚洲综合色网 | 精品九九久久 | 91看片在线观看 | 欧美日本在线观看 | 日韩精品1区2区3区 成人黄页在线观看 | 成人免费福利视频 | 人人做人人澡人人爽欧美 | h片在线看| 奇米四色在线观看 | 精品久久99 | 一区二区三区四区电影视频在线观看 | 国产免费人成xvideos视频 | 亚洲欧美一区二区三区1000 | 在线观看国产精品视频 | 免费在线观看一区二区三区 | 久久精品国产久精国产 | 亚洲影视在线 | 日本精品一区二区三区在线观看视频 | 精品视频一区二区三区 | 日韩精品一区二区三区中文在线 | 国产精品视频999 | 色爱区综合 | 精品视频一区二区三区在线观看 | 日本一区二区三区在线观看 | 欧美日韩视频在线播放 | 国产一级影片 | 国产毛片久久久 | 久久精品免费 | 一级黄色录像毛片 | 色婷婷av777 av免费网站在线 | 欧美精品在线视频 |