Common summary of some SQL statements (important)

Source: Internet
Author: User

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--Department display

SELECT * from Tc_contact where account_id=1246968--main view
SELECT * from Tcv_contact where accountid=1246968--contact
SELECT * from tcv_opportunity where accountid=1246968--Sales opportunities
SELECT * from tcv_activity where accountid=1246968--Sales action

SELECT count (t.yckb_id)--Class decision

from tcu_yckb T
INNER join tc_contact TC
on t.yckb_refid01 = tc.contact_id
and tc.org_id = t.org_id
In NER join Tcu_jiaoxplan JP
on t.yckb_refid02 = jp.jiaoxplan_id
and t.org_id = jp.org_id
INNER join Tc_account K HB
On tc.account_id = khb.account_id
and khb.org_id = tc.org_id
Where t.yckb_int05 = 1001--Lesson decision: participate
and T . QRCode = ' edc5903afe4a8777 ';

SELECT * from tcu_yckb where qrcode = ' edc5903afe4a8777 ' for update;
SELECT * from tcu_yckb where yckb_name like '% spectacular network test customer eight-Wang Xiaomeng-Innovation DreamWorks-21% ' for update--9992901d98300000
16:45:45
/mg Leaf Sub/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 = ' Liang '; --Remember it's contact_id and a contract_id d69d5fc04bf35555 9192901d98308888 e279cf6af9bf01f7
SELECT * from tcu_yckb ORDER BY create_time Desc--where qrcode are 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


--attendance time for formal classes
SELECT * from Tcu_jiaoxplan where jiaoxplan_name= ' investment Club 2015-3 '; --Investment Club 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, ' yes ', 1001, ' No ') as "sign-in status"
From TCU_YCKB
where QRCode in (' d69d5fc04bf35555 ', ' 9192901d98308888 ', ' 9992901d98308888 ', ' edc5903afe4a6666 ', ' edc5903afe4a8777 ', ' 9992901d98309999 ');

Update tcu_yckb Set yckb_int03 = 1002 where QRCode in (' edc5903afe4a8777 '); --Set specified code as checked in
Update tcu_yckb Set yckb_int03 = 1001 where QRCode in (' edc5903afe4a8777 '); --Set the specified code to no sign in

Select T.yckb_int06,decode (t.yckb_int06, 1001, ' Yes ', 1002, ' No ', 1003, ' No Business card ') ' Effective presence/qualified President '
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 ';

--Spectacular Internet app check-in System discussion group give them a statement to update a field
Select yckb_id,
Yckb_name,
QRCode,
yckb_int03,
yckb_int06,
Decode (yckb_int03, 1002, ' yes ', 1001, ' No ') as "sign-in status"
From TCU_YCKB
where QRCode in (' edc5903afe4a8777 ', ' edc5903afe4a6666 ', ' 9992901d98308888 ');

Update tcu_yckb Set yckb_int03 = 1001 where QRCode in (' 9992901d98308888 ');

--Change the code of the unpaid amount 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 ');



-No qualifying sign-in table found.
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

--Current date >= Registration Day (one day prior to the commencement date) 0, whose current date is 23:59:59 <= the date of the course.
Jp.jiaoxplan_date01-1 <= trunc (sysdate)
and trunc (JP.JIAOXPLAN_DATE02 + 1)-1/24/60/60 >= sysdate
and t.yckb_int03 = 1001--Sign-in status: No
--and T.yckb_type = 2136--Formal lessons
and t.yckb_int05 = 1001--Lesson Decision: participation
and T.qrcode = ' edc5903afe4a8777 ';


--Teaching Schedule revise valid check-in time you can change the time of the meeting and then run the site settings in vs. Note: The meeting is over
SELECT * from Tcu_jiaoxplan where jiaoxplan_name = ' Investment Club 2015-3 '
SELECT * from Tcu_jiaoxplan where jiaoxplan_name = ' president's annual meeting-eighth session '
SELECT * from Esi_validcontrol for update--2015/4/30 10:23:30

--The corresponding learning Plan
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;

--Texting these people.
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 '% equity investment experience% '

SELECT * FROM Tc_audit_stage_define

SELECT * from TCU_BASICPDU where basicpdu_name like '% Investment tutor% '

SELECT * from Tc_type where org_id=1 and obj_type=4
--Partner Development sales Opportunities 04
--old customer sales opportunity 10003
Select Stage_id,stage_name,stage_type from Tc_opportunity_stage where org_id=1 and type_id=2048
--Customer development and sales opportunities 10001
Select Stage_id,stage_name,stage_type from Tc_opportunity_stage where org_id=1 and type_id=2
--Invitation Opportunity 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 Private Advisor Investment mentor 825 Sales growth Plan Real class 712 star product Practice

/* Customer Development sales Opportunities
2889294 p0-Target Customer development
1355 P1-Build Trust
1365 p2-Excavation Requirements
2889301 p3-Value Shaping
p4-Objection Handling
113 p5-Win Commitment (receipt)
119 p6-to facilitate payment
126 p7-confirm the scene

opportunity to invite
Y1: Customer analysis and Strategy 5332444
Y2: Building trust 5332437
Y3: Mining Demand 5332428
Y4 Molding Value 5332418
Y5: Objection Handling 5332399
Y6: Win Commitment 5332392
Y7: Sign In 5332409

Sales opportunities for Old customers
S1: Customer analysis and Strategy 5332352
S2: Building trust 5332375
S3: Mining Demand 5332370
S4: Shaping Value 5332360
S5: Objection Handling 5332357
S6: Win Commitment 5332354
S7: Deal 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 the lack of a scheduled capital 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 '% Household income% '

/*
Project Highlights Projecttarget
Core Customer Keycustomers
Enterprise Core Focus Concernedpoints
Household Income Income
Investment Property Houseproperty
Financial Products Financialproducts
Stocks stock
Small loan loan
Equity investment Experience Investmentexperience
In the case of controllable risk, multiples of expected returns within 5 years expected Eturn
Is there a clear need for asset allocation ifassetrequirement
Is there a long-term equity investment concept Ifequityinvestment
Have you ever heard of an equity elective ifoptionalcourse
Do you know the mode of operation of the parent fund Ifknowfund
Have you ever participated in the fund raising iffundraising
Whether to ifinterestedfund the release of a parent fund
Do you know if you want to invest in a parent fund to buy an investment mentor Ifconditionoffund
Do you know the content value and price of an investment mentor Ifknowvalue
Whether the region is involved in early communication ifcommunication
Have you ever talked to an investment mentor Ifcourse
Customer Resistance Point Ifcustomerpoint
Financial phone Financalnumber
Financial name Financalname
Number Wechatnumber
Average revenue growth growthrate
Sales Method Salesmode
Planning ideas and competitive strategies of the company's products Companyplan
Is there any kind of product cdbfaifproductinfo
*/

Common summary of some SQL statements (important)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.