久久久久久久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>
                            主站蜘蛛池模板: 天天视频国产 | 日韩天堂网 | 黄色a一级 | 欧美人与野| 国产精品一区二区久久 | 中文字幕自拍 | www.com国产| 久久久久久九九九九 | 欧美日韩中文字幕在线观看 | 中文字幕在线一区二区三区 | 在线观看av网站 | 国产91清纯白嫩初高中在线观看 | 欧美在线观看一区二区 | 中国农村毛片免费播放 | 国产乱码一区二区三区 | 欧美精品亚洲精品 | 亚洲国产日韩在线 | 日日夜夜精品 | 日韩一级黄色片 | 日韩一级av毛片 | 破处视频在线观看 | 97精品国产 | 一区二区三区在线免费观看 | 欧美日韩在线视频观看 | 老司机午夜视频 | av免费网站 | 日本人做爰全过程 | 亚洲伊人色 | 激情av在线 | 日韩精品在线一区 | 成人午夜毛片 | 欧美日韩激情 | 亚洲一区二区中文字幕 | 日韩一级片在线观看 | 美女免费视频网站 | 中文字幕在线免费播放 | 日韩一区二区视频在线观看 | 亚洲精品一区二区在线观看 | 久热伊人 | 欧美视频一二三区 | 亚洲欧美日韩国产精品 |