当前位置:网站首页>Daily sql-seek the sum of successful investments in 2016
Daily sql-seek the sum of successful investments in 2016
2022-08-11 07:13:00 【Eating too much sugar will not gain weight】
Daily sql-find the sum of successful investments in 2016
Background
Conditions for successful investment in 2016:
1. The insured amount in 2015 is at least the same as the amount insured by another insured in 2015
2. The coordinates of this insured must be unique.
DDL
CREATE TABLE IF NOT EXISTS insurance (PID INTEGER(11), TIV_2015 NUMERIC(15,2), TIV_2016 NUMERIC(15,2), LAT NUMERIC(5,2), LON NUMERIC(5,2span>) );insert into insurance (PID, TIV_2015, TIV_2016, LAT, LON) values (1, 10, 5, 10, 10);insert into insurance (PID, TIV_2015, TIV_2016, LAT, LON) values (2, 20,20, 20, 20);insert into insurance (PID, TIV_2015, TIV_2016, LAT, LON) values (3, 10, 30, 20, 20span>);insert into insurance (PID, TIV_2015, TIV_2016, LAT, LON) values (4,10, 40, 40, 40);
sql
SELECT SUM(insurance.TIV_2016) AS TIV_2016FROM insuranceWHERE insurance.TIV_2015 IN( SELECT TIV_2015 FROM insurance GROUP BY TIV_2015 HAVING COUNT(*) > 1 )AND CONCAT(LAT, LON) IN( SELECT CONCAT(LAT, LON) FROM insurance GROUP BY LAT , LON HAVING COUNT(*) = 1 );
边栏推荐
- iptables入门
- window7开启远程桌面功能
- 求过去半年内连续30天以上每天都有1000元以上成交的商铺
- CLUSTER DAY04 (Block Storage Use Cases, Distributed File Systems, Object Storage)
- 已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- HCIP实验(pap、chap、HDLC、MGRE、RIP)
- 每日sql-求2016年成功的投资总和
- 安装cuda10.2下paddlepaddle的安装
- 亚马逊获得AMAZON商品详情 API 返回值说明
- Eight-legged text of mysql
猜你喜欢
随机推荐
空间金字塔池化 -Spatial Pyramid Pooling(含源码)
Conference OA Project My Conference
八股文之jvm
从mask-rcnn到shp
CLUSTER DAY04 (Block Storage Use Cases, Distributed File Systems, Object Storage)
HCIP 重发布/路由策略实验
拼多多API接口大全
Solve win10 installed portal v13 / v15 asked repeatedly to restart problem.
HCIP-生成树(802.1D ,标准生成树/802.1W : RSTP 快速生成树/802.1S : MST 多生成树)
推荐一个好用的IDEA插件---Translation—中英互译
Windos10专业版开启远程桌面协助
配置dns服务
抖音关键词搜索商品-API工具
arcgis填坑_3
《Show, Attend and Tell: Neural Image Caption Generation with Visual Attention》论文阅读(详细)
图文带你理解什么是Few-shot Learning
HCIP MPLS/BGP综合实验
会议OA项目之我的会议
window7开启远程桌面功能
拼多多api接口应用示例