当前位置:网站首页>Group by的用法
Group by的用法
2022-07-02 12:30:00 【芋辕-】
sql语句中的执行顺序:
from-> where -> join -> group by -> having ->select ->order by ->limit
group by之后,
select语句能够写的字段只有三种
1)group by的字段
2)聚合函数 sum count...
3) 常量值
例如:错误的写法,brand,model属性无法进行查询
select
mid_id,
brand,
model,
count(*) login
from dwd_start_log
group by mid_id;
纠正:
select
mid_id,
brand,
model,
count(*) login
from dwd_start_log
group by mid_id,brand,model;
边栏推荐
- Solve the problem of base64encoder error
- GraphX 图计算实践之模式匹配抽取特定子图
- 6090. Minimax games
- Fastjson list to jsonarray and jsonarray to list "suggested collections"
- How to import a billion level offline CSV into Nepal graph
- SQL修改语句
- 又是一年毕业季
- 2278. Percentage of letters in string
- 2279. 装满石头的背包的最大数量
- 基于 Nebula Graph 构建百亿关系知识图谱实践
猜你喜欢
Aiko ai Frontier promotion (7.2)
Postgressql stream replication active / standby switchover primary database no read / write downtime scenario
动态规划入门二(5.647.62)
Two traversal sequences are known to construct binary trees
【Experience Cloud】如何在VsCode中取得Experience Cloud的MetaData
Comment réaliser un graphique Nebula d'importation CSV hors ligne de niveau milliard
Armv8-a programming guide MMU (4)
如何实现十亿级离线 CSV 导入 Nebula Graph
隐藏在 Nebula Graph 背后的星辰大海
【Salesforce】如何确认你的Salesforce版本?
随机推荐
6090. Minimax games
Pyinstaller打包exe附带图片的方法
Review materials for the special topic of analog electronics with all essence: basic amplification circuit knowledge points
Folium, diagnosis and close contact trajectory above
Golang MD5 encryption and MD5 salt value encryption
6090. 极大极小游戏
数据库系统概论第一章简答题-期末考得怎么样?
C # get PLC information (kepserver) II
Traversal before, during and after binary tree
[leetcode] 876 intermediate node of linked list
[leetcode] 577 reverse word III in string
List of sergeant schools
Moveit obstacle avoidance path planning demo
[leetcode] 344 reverse string
Use ffmpeg command line to push UDP and RTP streams (H264 and TS), and ffplay receives
动态规划入门一,队列的bfs(70.121.279.200)
Wavedec2 in MATLAB, talk about the wavedec2 function [easy to understand]
《大学“电路分析基础”课程实验合集.实验七》丨正弦稳态电路的研究
6096. Success logarithm of spells and potions
[leetcode] 19 delete the penultimate node of the linked list