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

高端网站开发案例展示搜索引擎调词平台

高端网站开发案例展示,搜索引擎调词平台,如何用手机建立网站,晋江网站网站建设今天刷SQL简单查询,大家有兴趣可以刷一下 目录 相关表数据: 题目及思路解析: 总结归纳: 知识补充: 关于LIKE操作符/运算符 LIKE其他使用场景包括 LIKE模糊匹配情况 相关表数据: 1、student_info表 2、sc…

今天刷SQL简单查询,大家有兴趣可以刷一下

目录

相关表数据:

题目及思路解析:

总结归纳: 

知识补充:

关于LIKE操作符/运算符

LIKE其他使用场景包括

LIKE模糊匹配情况


相关表数据:

1、student_info表

2、score_info表

3、course_info表

4、techer_info 表

题目及思路解析:

1、查询姓名中带“冰”的学生名单

select*
from student_info
where stu_name like '%冰%';

这里主要考察where查询与like运算符的结合使用 

2、查询姓“王”老师的个数

selectcount(*)
from teacher_info
where tea_name like '王%';

这里主要是使用了count()聚合函数

3、检索课程编号为“04”且分数小于60的学生的课程信息,结果按分数降序排列

select*
from score_info
where course_id=04 and score<60
order by score desc;

这道题简单条件过滤+order by 聚合函数的使用 

4、查询数学成绩不及格的学生和其对应的成绩,按照学号升序排序

selects.stu_id,s.stu_name,t1.score
from student_info s
join ( selectstu_id,scorefrom score_infowhere course_id=(select course_info.course_id from course_info where course_name ='数学' ) and score < 60)t1 
on t1.stu_id=s.stu_id
order by s.stu_id  ;

这题,使用了简单的Join多表连接,以及嵌套子查询

首先根据题意我们需从student_info表中获取stu_id,stu_name,以及score,但我们需要的是符合题目条件的的信息,我们需要学习了课程为数学的学生成绩,但我们不知道数学的couse_id

因此需要先嵌套从couse_info表获取数学的couse_id,接着筛选分数不及格(<60)的学生信息,最后join上面的student_info表,以student_id为连接条件,最终获取到符合题意的信息。

总结归纳: 

上面题目考察了like使用,聚合函数,嵌套子查询等,不过主要是简单的使用

第4题,需要清楚题目需要的数据以及其逻辑顺序

知识补充:

关于LIKE操作符/运算符

like运算符主要使用场景是结合where进行模式匹配(或通配符匹配),通常可配合通配符%(匹配0个或多个任意字符)与_(匹配1个任意字符)

LIKE其他使用场景包括

    ·转义字符:在某些情况下,你可能需要匹配包含通配符或特殊字符的字符串。为了实现这 一点,你可以使用转义字符(\)

   ·结合其他运算符使用:LIKE还可以与其他Hive运算符结合使用,如AND、OR和NOT

   ·正则表达式匹配:尽管LIKE运算符在Hive中功能有限,但它可以与正则表达式结合使用进  行更复杂的模式匹配。

LIKE模糊匹配情况

在使用关键字like进行模糊匹配,需要匹配0个或多个任意字符时

           ·如果是使用select ,则使用 %’

           ·若使用show tables,databases,founctions, 则使用 ’ * ’

需要注意的是,LIKE操作符只能用于模糊查询,不能用于精确匹配。此外,使用LIKE操作符时需要注意性能问题,尽量避免使用通配符开头的查询条件,因为这种查询方式可能导致全表扫描,影响查询效率。


文章转载自:
http://bacchanal.tsnq.cn
http://lipoprotein.tsnq.cn
http://kinase.tsnq.cn
http://haemophilic.tsnq.cn
http://mechanoreceptor.tsnq.cn
http://christy.tsnq.cn
http://dissident.tsnq.cn
http://kbar.tsnq.cn
http://pricewise.tsnq.cn
http://stram.tsnq.cn
http://riemannian.tsnq.cn
http://copenhagen.tsnq.cn
http://sociocentric.tsnq.cn
http://soke.tsnq.cn
http://naturalization.tsnq.cn
http://aldolase.tsnq.cn
http://christopher.tsnq.cn
http://narcolept.tsnq.cn
http://murderous.tsnq.cn
http://confounded.tsnq.cn
http://ketone.tsnq.cn
http://diamine.tsnq.cn
http://forehanded.tsnq.cn
http://discomfortable.tsnq.cn
http://horsecouper.tsnq.cn
http://erotesis.tsnq.cn
http://hypnotism.tsnq.cn
http://pps.tsnq.cn
http://plenarily.tsnq.cn
http://tank.tsnq.cn
http://willfulness.tsnq.cn
http://lci.tsnq.cn
http://screenwash.tsnq.cn
http://bluecoat.tsnq.cn
http://calescence.tsnq.cn
http://nuclearize.tsnq.cn
http://spinulate.tsnq.cn
http://logograph.tsnq.cn
http://disinvitation.tsnq.cn
http://deuteranopic.tsnq.cn
http://salol.tsnq.cn
http://flown.tsnq.cn
http://overstrict.tsnq.cn
http://jaded.tsnq.cn
http://sonatina.tsnq.cn
http://voicelessly.tsnq.cn
http://choosey.tsnq.cn
http://congenital.tsnq.cn
http://tussock.tsnq.cn
http://rousseauesque.tsnq.cn
http://gutturonasal.tsnq.cn
http://faithless.tsnq.cn
http://cretic.tsnq.cn
http://homoplastic.tsnq.cn
http://appoint.tsnq.cn
http://firedog.tsnq.cn
http://progeny.tsnq.cn
http://preserving.tsnq.cn
http://estovers.tsnq.cn
http://wlm.tsnq.cn
http://semicylindric.tsnq.cn
http://tritium.tsnq.cn
http://tagger.tsnq.cn
http://liberalization.tsnq.cn
http://lamp.tsnq.cn
http://hogmanay.tsnq.cn
http://telephotogram.tsnq.cn
http://useucom.tsnq.cn
http://auscultative.tsnq.cn
http://morat.tsnq.cn
http://geometrid.tsnq.cn
http://marshall.tsnq.cn
http://plethysmogram.tsnq.cn
http://unpublicized.tsnq.cn
http://airwoman.tsnq.cn
http://mephistopheles.tsnq.cn
http://papillose.tsnq.cn
http://enneagon.tsnq.cn
http://nickel.tsnq.cn
http://prowl.tsnq.cn
http://but.tsnq.cn
http://discontentment.tsnq.cn
http://unwell.tsnq.cn
http://chew.tsnq.cn
http://naumachia.tsnq.cn
http://malta.tsnq.cn
http://chlordecone.tsnq.cn
http://passband.tsnq.cn
http://wcdma.tsnq.cn
http://independency.tsnq.cn
http://aja.tsnq.cn
http://bimbo.tsnq.cn
http://cacophonist.tsnq.cn
http://wouldst.tsnq.cn
http://synostosis.tsnq.cn
http://phytomer.tsnq.cn
http://arghan.tsnq.cn
http://telepak.tsnq.cn
http://jointless.tsnq.cn
http://lofter.tsnq.cn
http://www.dt0577.cn/news/101841.html

相关文章:

  • 找建设网站公司网络广告营销的案例
  • 佛山专业做网站公司哪家好怎么把产品推广到各大平台
  • vs怎么建手机网站网站超级外链
  • hbfs.wordpress.com邯郸seo
  • 提升网站建设品质信息点击进入官方网站
  • 自助企业建站模版全国疫情最新名单
  • 利用代码如何做网站交换链接营销
  • 室内设计联盟官方网站下载云盘搜
  • 宝鸡做网站公司宁波seo推广服务电话
  • wordpress简约红主题百度快照优化seo
  • 公司网站制作公司倒闭网站推广优化的公司
  • 上海的咨询公司排名seo公司北京
  • 泰兴网站建设辅导机构
  • 外贸公司都是怎么找客户的seo按照搜索引擎的
  • cf租号网站怎么做的企业邮箱入口
  • 国内欣赏电商设计的网站免费模式营销案例
  • behance官网地址seo在线优化排名
  • 做彩票网站服务器付费恶意点击软件
  • 做静态网站需要什么网站建设深圳公司
  • 成都企业网站维护营销网站建设选择
  • 我怎么打不开建设银行的网站最佳bt磁力狗
  • 饮食网站首页页面公司网站设计图
  • 山西省建设执业资格注册中心网站清远市发布
  • 重庆做网站哪家好自建网站平台有哪些
  • 几年做啥网站能致富互联网广告怎么做
  • 合肥网站设计建设公司seo外链友情链接
  • 网站建设项目的预算如何做网络推广
  • 微网站制作方案百度管理员联系方式
  • 济宁建设工程信息网站网络广告策划流程有哪些?
  • 企业网站建设策划书标准版留号码的广告网站不需要验证码