久久久久久久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>
                            主站蜘蛛池模板: 国产激情在线观看 | 午夜久久久久久久 | 欧美久久综合 | 国产精品久久久久久久成人午夜 | 日韩亚洲欧美在线观看 | 成人免费看片&#39; | 久久久少妇 | 性史性dvd影片农村毛片 | 欧美在线视频一区二区 | 99久久99| 天天操综合网 | 亚洲国产日韩欧美 | www.青青草 | 91在线| 久草成人| 超碰99在线 | 大尺度做爰床戏呻吟舒畅 | 午夜在线国语中文字幕视频 | 天天操狠狠干 | 99视频+国产日韩欧美 | 国产1区2区3区 | 欧美性猛交xxxx | 国产第一福利 | 免费看a级片 | 久久视频一区 | 久草视频免费在线 | 青娱乐av| www.av在线视频 | 青青艹在线视频 | 91在线精品秘密一区二区 | av每日更新 | 欧美黄色一级大片 | 一区二区三区四区在线视频 | 一级片aa | 日韩精品片 | 99热久| 精品国产99久久久久久宅男i | 成人毛片一区二区三区 | 国产成人综合网 | www99热| 国产高清一区二区 |