pta mysql训练题集 (101-120)

10-101 spj-查询比p6零件供应数量都高的零件

select distinct pno
from spj
where pno not in 
(
    select pno from spj where qty<=(select max(qty) from spj where pno='p6')
);

10-102 A3-1查询订单表中的平均运费

select avg(Freight) as avgFreight
from orders;

10-103 A3-2查询国家为Mexico、Germany的客户数量

select count(*) as custCount
from customers
where Country in ('Mexico','Germany');

10-104 A3-3查找产品表中最低的单价

select min(UnitPrice) as minUnitPrice
from products;

10-105 A3-4查询产品表中最大库存量

select max(UnitsInStock) as maxUnitsInStock
from products;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

三块不一样的石头

十分满意,一分打赏~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值