当前位置:网站首页>GBase 8s V8.8 SQL 指南:教程-6.2.1(3)
GBase 8s V8.8 SQL 指南:教程-6.2.1(3)
2022-04-22 22:05:00 【GBASE数据库】
下列查询中的自连接在 stock 表中创建由三个制造商供货的那些商品的列表。自连接在
WHERE 子句中包括最后两个条件,来除去行中检索到的重复的制造商代码。
图: 查询
SELECT s1.manu_code, s2.manu_code, s3.manu_code,
s1.stock_num, s1.description
FROM stock s1, stock s2, stock s3
WHERE s1.stock_num = s2.stock_num
AND s2.stock_num = s3.stock_num
AND s1.manu_code < s2.manu_code
AND s2.manu_code < s3.manu_code
ORDER BY stock_num;
图: 查询结果
manu_code manu_code manu_code stock_num description
HRO HSK SMT 1 baseball gloves
ANZ NRG SMT 5 tennis racquet
ANZ HRO HSK 110 helmet
ANZ HRO PRC 110 helmet
ANZ HRO SHM 110 helmet
ANZ HSK PRC 110 helmet
ANZ HSK SHM 110 helmet
ANZ PRC SHM 110 helmet
HRO HSK PRC 110 helmet
HRO HSK SHM 110 helmet
HRO PRC SHM 110 helmet
⋮
KAR NKL PRC 301 running shoes
KAR NKL SHM 301 running shoes
KAR PRC SHM 301 running shoes
NKL PRC SHM 301 running shoes
版权声明
本文为[GBASE数据库]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_47390342/article/details/124351867
边栏推荐
- 2.56-试着用不同的示例值来运行show_bytes的代码。
- Dynamic memory in C language
- 论文笔记: BRITS: Bidirectional Recurrent Imputation for Time Series
- SSM框架
- Vulnerability utilization in 2021: 95% of traditional vulnerabilities have been disclosed
- 千亿级IM独立开发指南!全球即时通讯全套代码4小时速成(二)
- 4 / 21 Kunming supplementary questions + mathematics
- How should enterprises make disaster recovery plans for Cloud Computing?
- Transport layer - overview of transport layer (1)
- 高端啤酒正在失去年轻人
猜你喜欢

7. Comparable to JMeter Net pressure measurement tool - crank Summary - what does crank bring

初学单片机点亮第一个外设--LED灯

Shadowcaster shadowmask map of 0 basic unityurp rendering pipeline is indistinct (code direction)
![[intranet penetration] - vulnstack (I)](/img/d4/b7267b8306b353ea6a8ac22d64f9f6.png)
[intranet penetration] - vulnstack (I)

Flex layout

【MMUB】基于Hidden Markov model的手机用户行为建模——Hidden Markov model

A journey to C by Xiao Sai Mao -- first understanding of C language (3)

一个简单易用的文件上传方案

Basic practice of C language (001-1)

Vulnerability utilization in 2021: 95% of traditional vulnerabilities have been disclosed
随机推荐
【Paper】2019_Distributed fixed-time consensus-based formation tracking for multiple nonholonomic whee
51 MCU proteus simulation key control nixie tube digital display
都是做全屋智能的,Aqara和HomeKit到底有什么不同?
MetaWork:拜托,这样远程结对编程超酷的!
企业应如何制定云计算使用中的灾难恢复计划?
Transport layer - connectionless transport: UDP (2)
SMB+MSSQL
【微信小程序开发(云壁纸小程序教程)】
Is it necessary to read the history of mathematics? We have neglected too much about mathematics education
repeat_dijkstra
Common commands of Linux
js的正则表达式
Why do others earn more than 10000 yuan a month as we media? How many cents do you have every day? What are the ways of realization?
The head is fixed on the ceiling, less than one screen of footer is fixed on the bottom, and more than one screen scrolls. Pay attention to the notes
[summary of scattered knowledge points 5]
opcua协议如何在appinventor上使用?
[untitled]
Sign up to open QKE container engine hosting version and container ecological Conference!
396. 旋转函数 / 剑指 Offer II 013. 二维子矩阵的和
kubeflow创建新用户用户密码