当前位置: 首页 > news >正文

公司网站制作流程网站排名查询alexa

公司网站制作流程,网站排名查询alexa,建站网站公司调查,机房托管知识重点#xff1a;1.extract(day from schedule01::timestamp)13Extract 属于 SQL 的 DML(即数据库管理语言)函数#xff0c;同样#xff0c;InterBase 也支持 Extract#xff0c;它主要用于从一个日期或时间型的字段内抽取年、月、日、时、分、秒数据#xff0c;因此1.extract(day from schedule01::timestamp)13Extract 属于 SQL 的 DML(即数据库管理语言)函数同样InterBase 也支持 Extract它主要用于从一个日期或时间型的字段内抽取年、月、日、时、分、秒数据因此它支持其关健字 YEAR、MONTH、DAY、HOUR、MINUTE、SECOND、WEEKDAY、YEARDAY。Extract 的使用语法为EXTRACT(关健字 FROM 日期或时间型字段)如extract(year from schedule01)2017从日期中提取年份2.max()函数取最大值3.case()函数的嵌套注意嵌套case()函数时每个case的开始和结束。排班功能现有两个人员(A和B)他们在不同日期的值班状态(state)不同现在要查询他们在2017.6月的值班信息表结构如下1 CREATE TABLE public.temp_schedule23 (45 id integer NOT NULL DEFAULT nextval(temp_schedule_id_seq::regclass),67 schedule01 timestamp without time zone,--日期89 schedule03 character varying(255),--姓名1011 state character varying(255),--值班状态(0休 1班)1213 CONSTRAINT temp_schedule_pkey PRIMARY KEY (id)1415 )View Code1.查询SQL语句1 select schedule03,schedule01,state fromtemp_schedule23 where extract(year from schedule01)2017 and extract(month from schedule01)645 order by schedule03,schedule01;View Code显示为2.现在需要根据(6月的)日期从1号开始根据人员名称横向合并排列数据(即只显示两行)显示效果如下实现的SQL语句如下1 select schedule03 asname23 ,max(case when extract(day from schedule01::timestamp)1 then state end) asday145 ,max(case when extract(day from schedule01::timestamp)2 then state end) asday267 ,max(case when extract(day from schedule01::timestamp)3 then state end) asday389 ,max(case when extract(day from schedule01::timestamp)4 then state end) asday41011 ,max(case when extract(day from schedule01::timestamp)5 then state end) asday51213 ,max(case when extract(day from schedule01::timestamp)6 then state end) asday61415 ,max(case when extract(day from schedule01::timestamp)7 then state end) asday71617 ,max(case when extract(day from schedule01::timestamp)8 then state end) asday81819 ,max(case when extract(day from schedule01::timestamp)9 then state end) asday92021 ,max(case when extract(day from schedule01::timestamp)10 then state end) asday102223 ,max(case when extract(day from schedule01::timestamp)11 then state end) asday112425 ,max(case when extract(day from schedule01::timestamp)12 then state end) asday122627 ,max(case when extract(day from schedule01::timestamp)13 then state end) asday132829 fromtemp_schedule3031 where extract(year from schedule01)2017 and extract(month from schedule01)63233 group by schedule03;View Code3.将人员的值班状态通过汉字(0休 1班)显示出来显示效果如下SQL语句(主要是实现case的嵌套)1 select schedule03 asname23 ,max(case when extract(day from schedule01::timestamp)1 then (case when state0 then 休 else 班 end) end) asday145 ,max(case when extract(day from schedule01::timestamp)2 then (case when state0 then 休 else 班 end) end) asday267 ,max(case when extract(day from schedule01::timestamp)3 then (case when state0 then 休 else 班 end) end) asday389 ,max(case when extract(day from schedule01::timestamp)4 then (case when state0 then 休 else 班 end) end) asday41011 ,max(case when extract(day from schedule01::timestamp)5 then (case when state0 then 休 else 班 end) end) asday51213 ,max(case when extract(day from schedule01::timestamp)6 then (case when state0 then 休 else 班 end) end) asday61415 ,max(case when extract(day from schedule01::timestamp)7 then (case when state0 then 休 else 班 end) end) asday71617 ,max(case when extract(day from schedule01::timestamp)8 then (case when state0 then 休 else 班 end) end) asday81819 ,max(case when extract(day from schedule01::timestamp)9 then (case when state0 then 休 else 班 end) end) asday92021 ,max(case when extract(day from schedule01::timestamp)10 then (case when state0 then 休 else 班 end) end) asday102223 ,max(case when extract(day from schedule01::timestamp)11 then (case when state0 then 休 else 班 end) end) asday112425 ,max(case when extract(day from schedule01::timestamp)12 then (case when state0 then 休 else 班 end) end) asday122627 ,max(case when extract(day from schedule01::timestamp)13 then (case when state0 then 休 else 班 end) end) asday132829 fromtemp_schedule3031 where extract(year from schedule01)2017 and extract(month from schedule01)63233 group by schedule03 ;View Code知识一点点的累积技术一点点的提高加油
http://www.pierceye.com/news/53480/

相关文章:

  • 如何提高网站搜索排名iis网站压缩
  • 国外网站设计风格anything popup wordpress 插件怎么使用
  • 哪个网站的排行榜权威磐安住房和城乡建设部网站
  • vps没问题访问不了网站网络网站建设价格
  • js做网站跳转做网站用哪种语言好
  • 购物网站开发代码厦门网站建设114
  • 聊城哪里可以学网站建设呢小程序注册了怎么注销
  • 三水网站制作公司网站建设与制作德州
  • 什么网站都能打开的浏览器网站详情页链接怎么做
  • 网站建设和开发网站抓取诊断ip出错
  • 长沙百度网站推广优化响应式网站建设系统
  • 厦门市建设局报表网站企业信息公示平台
  • 网站建设网站制作网页游戏公司排名
  • 170个可带链接锚文本外链的网站论坛wordpress 图片的设置
  • 网站开发工程师岗位职责wordpress模板图片不显示
  • 网站建设的功能特点有哪些搜索引擎中 哪些网站可以获得更好的排名
  • 怎么做福利视频网站爱彩人网站怎么做
  • 女人与狗做视频网站免费文档网站
  • 做外贸网站需要注册公司吗wordpress 评论头像
  • 晋江网站建设晋江wordpress 当前菜单
  • 基于网站的网络营销方法有哪些网络推广有哪些渠道
  • 嘉兴企业网站wordpress末班
  • 支付网站建设wordpress微信支付功能
  • 垂直类门户网站wordpress用了什么框架
  • 外包做的网站 需要要源代码吗钦州做网站的公司
  • 网站建设的基本要素wordpress修改文字大小
  • 深圳网站建设q双赢世讯县总工会网站建设情况介绍
  • 文字域名可以做网站织梦怎么做手机网站
  • 网站内容有哪些wordpress获取分类标题
  • 网站如何搬家wordpress的交叉表单