- 博客(6)
- 收藏
- 关注
原创 本笔记为阿里云天池龙珠SQL训练营的task06的学习内容,链接为“https://tianchi.aliyun.com/forum/postDetail?spm=5176.20222307.J_9”
task06练习题解答如下:练习题2select pc,`citricacid`,dense_rank()over ( patiton order by citricacid)asrankingfrom winequality-redwhere ph =3.03;注 dense_rank()over ( patiton order by)为中式排序。练习题3select *from(select Merchant_id,sum(SUBSTRING_IN...
2022-05-25 16:43:46 84
原创 本笔记为阿里云天池龙珠SQL训练营的学习内容,链接为“https://tianchi.aliyun.com/forum/postDetail?spm=5176.20222307.J_9059755“
练习题解答如下:5.1执行该程序后product_id 按照升序排列,会找出当前行的最高售价。5.2select regist_date, sum(sale_price)over(partitionbyregist_dateorderbyregist_date)from product;5.3①若没有指定partiton by 结果就会自动累加,针对排序的那一列进行全局排序。②SQL执行顺序是:from >where>group by >havi...
2022-05-24 22:13:21 100
原创 本笔记为阿里云天池龙珠训练SQL训练营的学习内容链接为“https://tianchi.aliyun.com/forum/postDetail?spm=5176.20222307.J_9059755”
练习题解答如下:4.1select *from productwhere sale_price>=500 unionselect *from product2where sale_price >=500;4.2select *from productwhere product_id not in (select product_idfrom product2)unionselect *from product2where p...
2022-05-24 21:55:46 129
原创 本笔记为阿里云天池龙珠训练SQL训练营的学习内容链接为“https://tianchi.aliyun.com/forum/postDetail?spm=5176.20222307.J_9059755“
练习题第一部分解答如下:3.1alter view ViewPractice5_1(product_name,sale_price,regist_date) asselect product_name,sale_price,regist_datefromproductwhere sale_price>=1000 andregist_date='2009-09-20';select *from ViewPractice5_13.2如果像习题一样创...
2022-05-18 17:19:34 119
原创 本笔记为阿里云天池龙珠训练SQL训练营的学习内容链接为“https://tianchi.aliyun.com/forum/postDetail?spm=5176.20222307.J_9059755”
task02的学习笔记如下练习题1代码select product_name,regist_datefrom productwhere regist_date > '2009-04-28'练习题2①SELECT * FROM product WHERE purchase_price = NULL;在表为product中筛选出purchase_price列里面值为NULL的其他行。②SELECT * FROM product WHERE p
2022-05-17 21:01:32 94
原创 本笔记为阿里云天池龙珠计划SQL训练营的学习内容
本笔记为阿里云天池龙珠训练SQL训练营的学习内容,链接为:“Task01:初识数据库与SQL-天池龙珠计划SQL训练营-天池技术圈-天池技术讨论区”Task01的学习笔记练习如下:练习题1编写一条 CREATE TABLE 语句,用来创建一个包含表 1-A 中所列各项的表 Addressbook (地址簿),并为 regist_no (注册编号)列设置主键约束表1-A 表 Addressbook (地址簿)中的列解答代码:CREATE TABLE addressbook(re..
2022-04-24 22:18:27 53
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人