当前位置:网站首页>GBase 8s V8. 8 SQL Guide: tutorial-5.2 (3)
GBase 8s V8. 8 SQL Guide: tutorial-5.2 (3)
2022-04-22 05:26:00 【Gbase database】
The following query and figure 4 identical , But it includes ORDER BY Clause by price Sort the retrieved rows in ascending order ,
As shown below .
chart : Inquire about
SELECT order_num, COUNT(*) number, SUM (total_price) price
FROM items
GROUP BY order_num
ORDER BY price;
chart : Query results
order_num number price
1010 2 $84.00
1011 1 $99.00
1013 4 $143.80
1022 3 $232.00
1001 1 $250.00
1020 2 $438.00
1006 5 $448.00
⋮
1002 2 $1200.00
1004 4 $1416.00
1014 2 $1440.00
1019 1 $1499.97
1021 4 $1614.00
1007 5 $1696.00
The section select a specific column describes how to select a specific column in ORDER BY Use integers in the clause to indicate the position of columns in the projection list . also
Can be in GROUP BY Clause to indicate the position of the column name or in GROUP BY The list displays the symbol
Number .
版权声明
本文为[Gbase database]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220524175647.html
边栏推荐
- Implementation of unity simple event system
- 【C#】LINQ
- Four startup modes of activity
- 遇见DOM
- Codeforces Round #783 (Div. 2) D - Optimal Partition(dp/权值线段树 2100)
- Codeforces Round #784 (Div. 4) All Problems
- Efficiency tool | special screenshot auxiliary software pureref
- MySQL数据库第十一次作业-视图的应用
- Defining "disinformation"
- Configure security policy on ENSP
猜你喜欢

Studio3t expired activation method / and scripts that reset the use date are not available solution / Studio 3T unlimited activation

2022-1-17 to 2022-1-30 iterator mode

Pyqt5 + yolov5 + MSS to realize a real-time desktop detection software

Auto.js 画布设置防锯齿paint.setAntiAlias(true);

Keil-C51 与 Keil -ARM 共存的方法

Tree array

IO stream

Fundamentals of graphics - Ambient Occlusion

Codeforces Round #784 (Div. 4) All Problems

2022.2.14-2.27 responsibility chain mode
随机推荐
Apache poi HSSF operation Excel
Studio3t expired activation method / and scripts that reset the use date are not available solution / Studio 3T unlimited activation
Social media and fake news in the 2016 election
Analysis of database log level: (2022.2.21-2022.2.27)
Go语言爬虫基础
[C #] implementation scheme of singleton mode
Ezyslice cut characters
【WPF】Popup
【C#】LINQ
How to use U deep boot U disk to clear the system login password
(2022.1.31-2022.2.14) template mode analysis
有限单元法基本原理和数值方法_有限元法基本原理
Meetup 02 review: Q & A highlights
Implementation of unity simple event system
Codeforces Round #781 (Div. 2) ABCD
Online Tetris with automatic hang-up source code
Codeforces Round #781 (Div. 2) ABCD
2022年JS新增小技巧
abcabc
Meetup 02期回顾:Q&A 集锦