一些sql语句的常用总结(重要)
select primary_flag from tc_contact where primary_flag !=0
select dept_id,dept_name,tree_level,tree_path from tc_department where
org_id=1 and stop_flag=0 order by tree_path --部门显示
SELECT * FROM TC_CONTACT where ACCOUNT_ID=1246968 --主视图
select * from TCV_CONTACT where ACCOUNTID=1246968 --联系人
select * from TCV_OPPORTUNITY where ACCOUNTID=1246968 --销售机会
select * from TCV_ACTIVITY where ACCOUNTID=1246968 --销售行动
SELECT count(t.yckb_id) --参课判定
FROM tcu_yckb t
inner join tc_contact tc
on t.yckb_refid01 = tc.contact_id
and tc.org_id = t.org_id
inner join tcu_jiaoxplan jp
on t.yckb_refid02 = jp.jiaoxplan_id
and t.org_id = jp.org_id
inner join tc_account khb
on tc.account_id = khb.account_id
and khb.org_id = tc.org_id
where t.yckb_int05 = 1001 -- 参课判定:参加
and t.qrcode = 'EDC5903AFE4A8777';
SELECT * from tcu_yckb where qrcode = 'EDC5903AFE4A8777' for update;
SELECT * from tcu_yckb where yckb_name like '%盛景网联测试客户八-王小梦-创新梦工厂 - 21%' for update --9992901D98300000
16:45:45
/mg叶子/mg 2015/5/11 16:45:45
select yckb_id, qrcode, yckb_int06
from tcu_yckb
where qrcode = '9992901D98308888';
select * from tc_contact where contact_name = '梁广永'; --记住是contact_ID 还有一个contract_ID D69D5FC04BF35555 9192901D98308888 E279CF6AF9BF01F7
select * from tcu_yckb order by create_time desc --where qrcode is not null
select * from tcu_yckb where yckb_refid01= 195166
select * from tcu_yckb where yckb_id = 416804 for update -- D69D5FC04BF3C5F0 yckb_refid01= 199933 and
--正式课的签到时间
select * from tcu_jiaoxplan where jiaoxplan_name='投资俱乐部2015-3'; --投资俱乐部2015-3
select * from esi_validcontrol --6628
for update
insert into esi_validcontrol values('6668','2015/4/29 10:23:39','12284','2015/4/29 10:23:39',0,0)
select yckb_id,
yckb_name,
qrcode,
yckb_int03,
yckb_int06,
decode(yckb_int03, 1002, '是', 1001, '否 ') as "签到状态"
from tcu_yckb
where qrcode in('D69D5FC04BF35555','9192901D98308888','9992901D98308888','EDC5903AFE4A6666','EDC5903AFE4A8777','9992901D98309999');
update tcu_yckb set yckb_int03 = 1002 where qrcode in('EDC5903AFE4A8777'); --设置指定code成已签到
update tcu_yckb set yckb_int03 = 1001 where qrcode in('EDC5903AFE4A8777'); --设置指定code成未签到
select t.yckb_int06,decode(t.yckb_int06, 1001, '是' , 1002, '否', 1003, '无名片') "有效到场/合格总裁"
from tcu_yckb t where qrcode = '9992901D98308888';
select yckb_int06 from tcu_yckb t where qrcode = '9992901D9830888812';
select yckb_int06 from tcu_yckb t where qrcode = 'EDC5903AFE4A8777';
tcu_yckb
select count(yckb_id)
from tcu_yckb
where qrcode = 'EDC5903AFE4A8777';
--盛景网联APP签到系统讨论组 给他们更新字段的语句
select yckb_id,
yckb_name,
qrcode,
yckb_int03,
yckb_int06,
decode(yckb_int03, 1002, '是', 1001, '否 ') as "签到状态"
from tcu_yckb
where qrcode in('EDC5903AFE4A8777','EDC5903AFE4A6666','9992901D98308888');
update tcu_yckb set yckb_int03 = 1001 where qrcode in('9992901D98308888');
--更改未收款金额的代码 19800 ==> 0
select * from tc_contract
select contract_unpayed_amount from tc_contract where account_ID=1246968 for update
select account_ID from tcu_yckb where qrcode in('EDC5903AFE4A8777','EDC5903AFE4A6666');
--没找到符合条件的签到表。
SELECT count(t.yckb_id)
FROM tcu_yckb t
inner join tc_contact tc
on t.yckb_refid01 = tc.contact_id
and tc.org_id = t.org_id
inner join tcu_jiaoxplan jp
on t.yckb_refid02 = jp.jiaoxplan_id
and t.org_id = jp.org_id
inner join tc_account khb
on tc.account_id = khb.account_id
and khb.org_id = tc.org_id
where
-- jp.jiaoxplan_date01 >= trunc(sysdate)
-- and (trunc(jp.jiaoxplan_date02 + 1) - 1 / 24 / 60 / 60) > sysdate
-- 当前日期>=报到日(开课日期前一天)0点,其当前日期<=结课日期的23:59:59
jp.jiaoxplan_date01 - 1 <= trunc(sysdate)
and trunc(jp.jiaoxplan_date02 + 1) - 1 / 24 / 60 / 60 >= sysdate
and t.yckb_int03 = 1001 -- 签到状态:否
-- and t.yckb_type = 2136 -- 正式课
and t.yckb_int05 = 1001 -- 参课判定:参加
and t.qrcode = 'EDC5903AFE4A8777';
--教学计划表 修改有效签到时间 也可以改一下那个会的时间 然后在vs运行一下网站设置 注:会议已经结束
select * from tcu_jiaoxplan where jiaoxplan_name = '投资俱乐部2015-3'
select * from tcu_jiaoxplan where jiaoxplan_name = '总裁年会-第八届'
select * from esi_validcontrol for update --2015/4/30 10:23:30
--相应的学习计划
select tb.yckb_id from tcu_yckb tb where tb.qrcode = '9992901D98308888' for update --416788
SELECT count(t.ref_1)
from tcu_yckb_1_1
where yckb_id = qdID;
--给这几个人发短信
select * from esi_recipient
select dept_id,dept_name,tree_level,tree_path from tc_department
where org_id=1 and stop_flag=0 order by tree_path
select * from tcv_contact where accountID=1246968 --NAME like'%zyl%'
select * from tcv_opportunity where accountID=1246968
select * from tcv_contact order by modifiedtime desc
select * from tc_contact order by create_time desc
select t.*, t.rowid from SJ_ACTIVITYSTAGECONFIGURE t
select * from tcv_account_attrs where label like'%股权投资经验%'
select * from tc_audit_stage_define
select * from tcu_basicpdu where basicpdu_name like '%投资导师%'
select * from tc_type where org_id=1 and obj_type=4
--合作伙伴开发销售机会 04
--老客户销售机会 10003
select stage_id,stage_name,stage_type from tc_opportunity_stage where org_id=1 and type_id=2048
--客户开发销售机会 10001
select stage_id,stage_name,stage_type from tc_opportunity_stage where org_id=1 and type_id=2
--邀约机会 10006
select stage_id,stage_name,stage_type from tc_opportunity_stage where org_id=1 and type_id=2241
select * from tc_opportunity_stage where org_id=1 and type_id=2
--224 私人顾问投资导师 825 销售增长计划实操班 712 明星产品实操班
/* 客户开发销售机会
2889294 P0-目标客户开发
1355 P1-建立信赖
1365 P2-挖掘需求
2889301 P3-价值塑造
105 P4-异议处理
113 P5-赢取承诺(回执)
119 P6-促成收款
126 P7-确认到场
邀约机会
Y1:客户分析与策略 5332444
Y2:建立信赖 5332437
Y3: 挖掘需求 5332428
Y4塑造价值 5332418
Y5: 异议处理 5332399
Y6:赢取承诺 5332392
Y7: 签到 5332409
老客户销售机会
S1:客户分析与策略 5332352
S2 :建立信赖 5332375
S3:挖掘需求 5332370
S4:塑造价值 5332360
S5:异议处理 5332357
S6:赢取承诺 5332354
S7:成交 5332353
*/
S2 tc_account.acct_int05,tc_account.billing_address,tc_account_attr.acct_multi16,tc_account_attr.acct_multi17,tc_account.acct_date08,tc_account.acct_int07,tc_account.acct_int13,tc_account.acct_int17,tc_account.acct_int18,tc_account.acct_char01,tc_account.acct_char02,tc_account.acct_multi06,tc_account_xattr.acct_int50
S3 缺少可调度资金 tc_account_xattr.acct_int51,tc_account_attr.acct_multi08,tc_account_xattr.acct_int53,tc_account_xattr.acct_int52,tc_account_xattr.acct_int54,tc_account_xattr.acct_int55,tc_account_xattr.acct_int56,tc_account_xattr.acct_int57
S4 tc_account_xattr.acct_int58,tc_account_xattr.acct_int59,tc_account_xattr.acct_int60,tc_account_xattr.acct_int61,tc_account_xattr.acct_int62,tc_account_xattr.acct_int63,tc_account_xattr.acct_int64,tc_account_1_1.int_1,tc_account_1_1.int_2,tc_account_1_1.int_3
S5 tc_account_1_1.int_4
tc_account_1_1.int_5,tc_account_attr.acct_multi18,tc_account_1_1.txt_4
select * from tcv_account_attrs where label like'%家庭年收入%'
/*
项目亮点 projecttarget
核心客户 keycustomers
企业核心关注点 concernedpoints
家庭年收入 income
投资性房产 houseproperty
理财产品 financialproducts
股票 stock
小额贷 loan
股权投资经验 investmentexperience
在风险可控的前提下,5年内期望回报的倍数 expected eturn
是否有明确的资产配置需求 ifassetrequirement
是否有中长期股权投资理念 ifequityinvestment
是否听过股权选修课 ifoptionalcourse
是否了解母基金的运作模式 ifknowfund
是否参加过基金募集 iffundraising
是否对发布的某支母基金动过心 ifinterestedfund
是否知道要投母基金要购买投资导师 ifconditionoffund
是否知道投资导师的内容价值和价格 ifknowvalue
大区是否提前介入沟通 ifcommunication
是否谈过投资导师 ifcourse
客户抗拒点 ifcustomerpoint
财务电话 financalnumber
财务姓名 financalname
微信号 wechatnumber
收入平均增长率 growthrate
销售方式 salesmode
公司产品的规划思路和竞争策略 companyplan
是否有各类产品的CDBFA ifproductinfo
*/
一些sql语句的常用总结(重要)的更多相关文章
- 浅谈MySQL中优化sql语句查询常用的30种方法 - 转载
浅谈MySQL中优化sql语句查询常用的30种方法 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中使 ...
- Mybatis 动态Sql语句《常用》
MyBatis 的强大特性之一便是它的动态 SQL.如果你有使用 JDBC 或其他类似框架的经验,你就能体会到根据不同条件拼接 SQL 语句有多么痛苦.拼接的时候要确保不能忘了必要的空格,还要注意省掉 ...
- mysql中sql语句的常用语句
1:提取公共的sql语句: 2:动态添加----sql语句: 代码: <insert id="test1" parameterType="com.floor.sho ...
- MySQL中优化sql语句查询常用的30种方法
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使 ...
- MySQL中优化sql语句查询常用的种方法
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索 ...
- 浅谈MySQL中优化sql语句查询常用的30种方法
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索 ...
- Mysql 性能优化7【重要】sql语句的优化 浅谈MySQL中优化sql语句查询常用的30种方法(转)
原文链接 http://www.jb51.net/article/39221.htm 这篇文章大家都在转载,估计写的有条理吧,本人稍微做一下补充 1.对查询进行优化,应尽量避免全表扫描,首先应考虑 ...
- mysql补充(3)优化sql语句查询常用的30种方法
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索 ...
- 浅谈 MySQL 中优化 SQL 语句查询常用的 30 种方法
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索 ...
随机推荐
- linux定时执行任务
(1)Linux下如何定时执行php脚本?(2)Linux下如何设置定时任务?(3)Crontab定时执行程序 核心提示:键入 crontab -e 编辑crontab服务文件 分为两种情况:(还有一 ...
- 学习从零开始写jQuery框架
随着时代发展,javascript阵营里面出现了越来越多的优秀的框架,大大简化了我们的开发工作,在我们使用这些框架的时候是不是也应该饮水思源想想它们都是怎样构建起来的呢?如果你不满足于仅仅是使用一些现 ...
- Java使用BigDecimal精确计算的简单公式计算器
由于工作需要,写了一个使用BigDecimal运算的精确计算的计算器(然后发现其实比不用BigDecimal的并好不到哪里去) 只能做加减乘除 double类型的数字在千万级别的时候会转成科学计数法, ...
- composer安装fxp插件时候提示内存不足且没有交换空间的解决办法
The following exception is caused by a lack of memory and not having swap Check https://getcomposer. ...
- 06-scanf函数
本文目录 变量的内存分析 scanf函数 回到顶部 一. 变量的内存分析 1. 字节和地址 为了更好地理解变量在内存中的存储细节,先来认识一下内存中的“字节”和“地址”. 1> 内存以“字节为单 ...
- 程序设计入门—Java语言 第六周编程题 1 单词长度(4分)
第六周编程题 依照学术诚信条款,我保证此作业是本人独立完成的. 1 单词长度(4分) 题目内容: 你的程序要读入一行文本,其中以空格分隔为若干个单词,以'.'结束.你要输出这行文本中每个单词的长度.这 ...
- JQuery_高级选择器
在很多特殊的元素上,比如父子关系的元素,兄弟关系的元素,特殊属性的元素等等. 在早期 CSS 的使用上,由于 IE6 等低版本浏览器不支持,所以这些高级选择器的使用也不具备普遍性,但随着 jQuery ...
- JQuery_简单选择器
jQuery 最核心的组成部分就是:选择器引擎.它继承了 CSS 的语法,可以对 DOM 元素的标签名.属性名.状态等进行快速准确的选择,并且不必担心浏览器的兼容性. jQuery选择器实现了 CSS ...
- window.onload()和$(function(){});的区别
1.window.onload必须等到页面中所有元素加载完之后才会执行(包括图片.视频等)而$(function(){});是在结构绘制完毕之后执行,二者的执行时机是不同的,一般来说后者会首先执行 2 ...
- CSS 3 动画2D
动画分为两种,1,逐帧动画 组成动画的每一个画面就是一帧 2,关键帧动画,确定关键帧电脑会自动过度 动画中如果遇到不兼容的问题也是要加前缀 @-webkit-keyframes规则 @-webk ...