日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

form子句语法错误_用示例语法解释SQL的子句

發布時間:2023/11/29 数据库 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 form子句语法错误_用示例语法解释SQL的子句 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

form子句語法錯誤

HAVING gives the DBA or SQL-using programmer a way to filter the data aggregated by the GROUP BY clause so that the user gets a limited set of records to view.

HAVING為DBA或使用SQL的程序員提供了一種過濾由GROUP BY子句聚合的數據的方法,以便用戶可以查看一組有限的記錄。

使用例 (Example of use)

The HAVING clause is like the WHERE clause, except it acts on the grouped data. In this case, the user will only see the largest amounts.

HAVING子句與WHERE子句類似,不同之處在于它對分組的數據起作用。 在這種情況下,用戶只會看到最大的金額。

This data is from the campaign contributions data we’ve been using in some of these guides.

此數據來自我們在其中一些指南中一直使用的廣告系列貢獻數據。

This SQL statement is answering the question: “which candidates received the largest total contributions in 2016 BUT only those that had more than 8$20 Million USD?”

該SQL語句回答了以下問題:“哪些候選人在2016年BUT中獲得的捐款最多,只有那些收入超過8千萬美元的候選人?”

Ordering this data set in a descending (DESC) order places the candidates with the largest total contributions at the top of the list.

按降序(DESC)排序此數據集,將總貢獻最大的候選者放在列表的頂部。

SELECT Candidate, Election_year, sum(Total_$), count(*) FROM combined_party_data WHERE Election_year = 2016 GROUP BY Candidate, Election_year -- this tells the DBMS to summarize by these two columns HAVING sum(Total_$) > 20000000 -- limits the rows presented from the summary of money ($20 Million USD) ORDER BY sum(Total_$) DESC; -- orders the presented rows with the largest ones first.+--------------------------------------------------+---------------+-------------------+----------+ | Candidate | Election_year | sum(Total_$) | count(*) | +--------------------------------------------------+---------------+-------------------+----------+ | CLINTON, HILLARY RODHAM & KAINE, TIMOTHY M (TIM) | 2016 | 568135094.4400003 | 126 | | TRUMP, DONALD J & PENCE, MICHAEL R (MIKE) | 2016 | 366853142.7899999 | 114 | | SANDERS, BERNARD (BERNIE) | 2016 | 258562022.17 | 122 | | CRUZ, RAFAEL EDWARD (TED) | 2016 | 93430700.29000005 | 104 | | CARSON, BENJAMIN S (BEN) | 2016 | 62202411.12999996 | 93 | | RUBIO, MARCO ANTONIO | 2016 | 44384313.9 | 106 | | BUSH, JOHN ELLIS (JEB) | 2016 | 34606731.78 | 97 | +--------------------------------------------------+---------------+-------------------+----------+ 7 rows in set (0.01 sec)

As with all of these SQL things there is MUCH MORE to them than what’s in this introductory guide.

與所有這些SQL事物一樣,它們比本入門指南中的內容要多得多。

I hope this at least gives you enough to get started.

我希望這至少能給您足夠的入門。

Please see the manual for your database manager and have fun trying different options yourself.

請參閱數據庫管理員的手冊,并嘗試自己嘗試其他選項,這很有趣。

翻譯自: https://www.freecodecamp.org/news/the-sql-having-clause-explained-with-example-syntax/

form子句語法錯誤

總結

以上是生活随笔為你收集整理的form子句语法错误_用示例语法解释SQL的子句的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。