22222

练习题1
select product_name,regist_date from product where regist_date>'2009-4-28';


练习题2
1.查询结果返回purchase_price为空的数据
2.查询结果返回purchase_price不为空的数据
3.查询结果返回purchase_price非空的数据

练习题3
select product_name,sale_price,purchase_price from product where sale_price-purchase_price>=500;
select product_name,sale_price,purchase_price from product having sale_price-purchase_price>=500;

练习题4
select product_name,product_type,saleprice*0.9 - purchase_price as profit from product saleprice*0.9 - purchase_price > 100
and product_type in ('办公用品','厨房用具');

练习题5
where执行在前,group by执行在后

练习题6
select product_type,sum(sale_price) sale_sum,sum(purchase_price) purchase_sum from product where sum(sale_price) >sum(purchase_price)*1.5
group by product_type;

练习题7
select * from product where regist_date order by regist_date desc;

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值