sql查询作业-保单涉及表的复杂查询
来源:互联网 发布:二手船用雷达淘宝网 编辑:程序博客网 时间:2024/05/01 18:39
1. 根据一个保单号grpcontno 查询出 投保单位的地址信息, 省,市 县 详细地址
select province||city||country||grpaddress from lcgrpaddress la inner join lcgrpappnt lc on la.customerno = lc.customerno and la.addressno = lc.addressno where grpcontno='GA01019900000212'
2. 根据一个保单号 查询出 保单下有那些计划, 计划编码, 计划名称
select contplancode ,contplanname from lccontplan where grpcontno='GA01019900000212'
3。 根据一个 人的名称, 人的idno 查询出 这个人 是那些保单的被保人,
select grpcontno from lccont where insuredname='一号被保人'and lccont.insuredIdno='123456'
4、 根据 一个保单号 一个人的 name,idno , 查询出 这个人有哪些险种, 每个险种的保费是多少。
select lm.riskname ,lp.prem from lccont lc inner join lcpol lp on lp.contno = lc.contno inner join lmriskapp lm on lm.riskcode=lp.riskcode
where lp.grpcontno='GA01019900000212'and lc.insuredname='一号被保人' and lc.insuredIdno='123456'
5、 根据 一个保单号 一个人的 name,idno , 查询出 这个人有哪些责任, 每个责任的保费是多少。
select dutyname ,lc.prem from lccont la inner join lcpol lb on la.contno=lb.contno inner join lcduty lc on lb.polno=lc.polno inner join lmduty ld on ld.dutycode=lc.dutycode
where lb.grpcontno='GA01019900000212' and la.insuredname='一号被保人' and la.insuredIdno='123456'
6、 根据一个保单号, 查询出 总共有多少被保人, 共有多少保费
select count(countno),sum(prem) from lccont where grpcontno='GA01019900000212'
- sql查询作业-保单涉及表的复杂查询
- SQL复杂的查询
- 复杂的sql数据库查询
- sql的复杂查询步骤
- SQL单表复杂查询
- 表的复杂查询
- sql 复杂查询 多表查询 分页查询
- SQL Server 复杂查询
- SQL复杂查询语句
- 其他复杂SQL查询
- Sql复杂查询
- sql复杂嵌套查询
- SQL-(3) --复杂查询
- sql复杂查询
- sql复杂查询
- 复杂sql查询经验
- SQL复杂查询练习
- 表的复杂查询---子查询
- MFC创建主对话框为非模态对话框
- 2.http dns
- Caffe 训练遇到的问题
- Java中的多态性理解(注意与C++区分)
- FlowNet: Learning Optical Flow with Convolutional Networks
- sql查询作业-保单涉及表的复杂查询
- 实验六—【项目一:数组操作】
- log4j 格式详解
- python manage.py dbshell
- JS学习之浏览器对象(十一)
- linux之加大服务器文件描述符
- python 字符串的split()函数详解
- CUDA 8.0 + cudnn5.1 + OpenCV3.1.0(Ubuntu14.04)
- easyUI使用技巧收集