自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 20220420

with tt as(select count(case when u.behavior_type=1 then u.user_id end) dj_user, count(case when u.behavior_type=2 then u.user_id end) sc_user, count(case when u.behavior_type=3 then u.user_id end) jg_user, count(case when u.behavi

2022-04-20 10:46:44 174

原创 【无标题】

一、求取用户最后一次购物的远近程度1.首先从表userds1中选取出来用户的ID和用户最近一次进行购物距离统计最后一天的间隔天数t:select u.user_id, (date'2014-12-18'-max(u.time)) t from userds1 u where u.behavior_type=4group by u.user_id order by 2,1;2.对于用户最后一次消费的间隔天数进行打分,小于2天的打5分;小于5天的4分;小于10天的3分;小于20天的2分;其他的打1分:

2022-04-19 17:46:33 41

原创 2022 4 14 xiawu

with tt as (select sal, casewhen sal<2000 then '贫困'when sal>4000 then '资本家'else '中产'end elevel from emp order by sal) select elevel,count(1) from tt group by elevel; select count(1) into c from emp e where e.deptno=dno; if c !=0 then fo.

2022-04-14 15:30:29 72

原创 2022 0414

--1、输入一个部门编号,给emp表中该部门的每个员工增加100元奖金,--使用隐式游标输出多少个人的奖金受到影响。declarebegin update emp e set sal = e.sal + 100; if sql%found then dbms_output.put_line('工资修改成功,影响行数'||sql%rowcount); else dbms_output.put_line('没有修改'); end if; rollback;end;

2022-04-14 13:04:31 176

原创 【无标题】

declarebegin loop dbms_output.put_line(' '); dbms_output.put_line(' '); exit when 1=1; end loop; dbms_output.put_line('3'); end; ```sqldeclarebegin for i in 1..10 loop if i = 6 then continue; end if; dbms_output.

2022-04-13 17:48:53 80

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除