1. 不要在字段上用转换函数,尽量在常量上用。如:
select id from employee where to_char(create_date,'yyyy-mm-dd')='2012-10-31' (错)
select id from employee where create_date=to_date('2012-10-31','yyyy-mm-dd') (对)
2. 不论一个sql中涉及到多个表,每次都用两个表(结果集)操作,得到新的结果后,再和下一个表(结果集)操作。
3. 尽量使用exists而非in
当然这个也要根据记录的情况来定用exists还是用in, 通常的情况是用exists
select id from employee where salary in (select salary from emp_level where....) (错)
select id from employee where salary exists(select 'X' from emp_level where ....) (对)
4. 使用not exists 而非not in
和上面的类似
5. 正确使用索引
索引可以提高速度,一般来说,选择度越高,索引的效率越高
6.. 索引类型
唯一索引,对于查询用到的字段,尽可能使用唯一索引。
还有一些其他类型,如位图索引,在性别字段,只有男女的字段上用。
7. 在经常进行连接,但是没有指定为外键的列上建立索引
8. 在频繁进行排序会分组的列上建立索引,如经常做group by 或 order by 操作的字段。
9. 在条件表达式中经常用到的不同值较多的列上建立检索,在不同值少的列上不建立索引。如性别列上只有男,女两个不同的值,就没必要建立索引(或建立位图索引)。如果建立索引不但不会提高查询效率,反而会严重降低更新速度。
10.应尽量避免在 where 子句中使用 or 来连接条件,否则将导致引擎放弃使用索引而进行全表扫描,如:
select id from t where num=10 or num=20
可以这样查询:
select id from t where num=10
union all
select id from t where num=20
11.如果在 where 子句中使用参数,也会导致全表扫描。因为SQL只有在运行时才会解析局部变量,但优化程序不能将访问计划的选择推迟到运行时;它必须在编译时进行选择。然而,如果在编译时建立访问计划,变量的值还是未知的,因而无法作为索引选择的输入项。如下面语句将进行全表扫描:
12.应尽量避免在 where 子句中对字段进行表达式操作,这将导致引擎放弃使用索引而进行全表扫描。如:
select id from t where num/2=100
应改为:
select id from t where num=100*2
13.应尽量避免在where子句中对字段进行函数操作,这将导致引擎放弃使用索引而进行全表扫描。如:
select id from t where substring(name,1,3)='abc'--name以abc开头的id
select id from t where datediff(day,createdate,'2005-11-30')=0--‘2005-11-30’生成的id
应改为:
select id from t where name like 'abc%'
select id from t where createdate>='2005-11-30' and createdate<'2005-12-1'
14.索引并不是越多越好,索引固然可以提高相应的 select 的效率,但同时也降低了 insert 及 update 的效率,因为 insert 或 update 时有可能会重建索引,所以怎样建索引需要慎重考虑,视具体情况而定。一个表的索引数最好不要超过6个,若太多则应考虑一些不常使用到的列上建的索引是否有必要。
15. SQL语句看起来就一条,但是相对于Java、C等编程语言来说,学习起来难度要大很多。主要是SQL这玩意太抽象了。一条编程语言语句,我们能清楚地知道执行结果是什么;而一条SELECT语句,得到最终结果可能要经历好几个步骤,脑袋要转好几个弯。
16. 建立一个临时表 多种数据类型的字段可以都加上一些 然后练习如何在这些数据里查询和准确定位到自己想要的语句,在练习的过程当中 你就会自然而然的想去使用和找寻相关的函数和方法 这个时候你就可能会理解 什么时候要用JOIN 什么时候要用LEFT JOIN 什么时候需要GROUP BY一下
Sunday, January 3, 2016
Saturday, December 12, 2015
Sunday, December 6, 2015
WebFocus Excel 2010 template Limitation - Solved
WF7.7.04 support excel 2010 template:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1957058036?r=1957058036#1957058036
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1577099666?r=2047092766#2047092766
Format EXL07 in WebFOCUS Version 7 Release 7.02 does not support the following features currently supported for EXL2K:
+Table of Contents (BYTOC).
+Row Overflow (generating overflow worksheets when the sheet row limit is reached).
+Bursting.
+Formula.
+Cell Locking.
+Compound.
+Multiple sheets.
+Multiple tables on a single sheet.
+Images.
+WebFOCUS Graphs.
+Pivot Tables.
+Templates with macros.
+Cell sizing with SQUEEZE and WRAP.
+ToolTips for Drilldown Hyperlinks.
+Preserving leading and internal blanks
Ref: page 15-16
http://documentation.informationbuilders.com/masterindex/html/pdf_wf_7702/tm4690.pdf
http://www.informationbuilders.com/support/developers/ExcelTemplate
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1957058036?r=1957058036#1957058036
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1577099666?r=2047092766#2047092766
Format EXL07 in WebFOCUS Version 7 Release 7.02 does not support the following features currently supported for EXL2K:
+Table of Contents (BYTOC).
+Row Overflow (generating overflow worksheets when the sheet row limit is reached).
+Bursting.
+Formula.
+Cell Locking.
+Compound.
+Multiple sheets.
+Multiple tables on a single sheet.
+Images.
+WebFOCUS Graphs.
+Pivot Tables.
+Templates with macros.
+Cell sizing with SQUEEZE and WRAP.
+ToolTips for Drilldown Hyperlinks.
+Preserving leading and internal blanks
Ref: page 15-16
http://documentation.informationbuilders.com/masterindex/html/pdf_wf_7702/tm4690.pdf
http://www.informationbuilders.com/support/developers/ExcelTemplate
Thursday, November 19, 2015
SAS Notepad++ Language Pack
<UserLang name="SAS3" ext="sas SAS">
<Settings>
<Global caseIgnored="yes"/>
<TreatAsSymbol comment="yes" commentLine="no"/>
<Prefix words1="no" words2="no" words3="yes" words4="yes"/>
</Settings>
<KeywordLists>
<Keywords name="Delimiters">"'0"'0</Keywords>
<Keywords name="Folder+">proc data</Keywords>
<Keywords name="Folder-">run RUN</Keywords>
<Keywords name="Operators">' - ! " & ( ) , . : ; ? @ [ \ ] ^ ` { | } ~ + < ></Keywords>
<Keywords name="Comment">1/* 2*/ 0</Keywords>
<Keywords name="Words1">
append bmdp calendar catalog chart cimport compare contents convert copy corr cport datasets format forms freq glm gplot logistic means npar1way options pds plot pmenu print printto rank release sort source spell sql standard summary tabulate tapecopy tapelabel timeplot transpose ttest univariate v5tov6
</Keywords>
<Keywords name="Words2">
$include _all_ _character_ _cmd_ _error_ _freq_ _i_ _infile_ _last_ _msg_ _n_ _null_ _numeric_ _temporary_ _type_ abort addr adjrsq alpha alter altlog altprint array attrib authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward base blocksize bufno bufsize by byerr byline call cards cards4 catcache cbufno center change chisq class cleanup cntllev codegen col collin column comamid comaux1 comaux2 comdef config continue cpuid create datalines datalines4 dbcslang dbcstype ddm delete delimiter descending device dflang display distinct dkricond dkrocond dlm do drop dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov error errorcheck errors feedback file fileclose filefmt filevar first first. firstobs fmterr fmtsearch font fontalias footnote footnote1 footnote2 footnote3 footnote4 footnote5 footnote6 footnote7 footnote8 footnote9 force formatted formchar formdelim formdlim forward from go goto group gwindow hbar helpenv helploc honorappearance hostprint hpct html hvar ibr id if infile informat initcmd initstmt inr into invaliddata is join keep kentb label last last. leave lib library line linesize link list lostcard lrecl ls macro macrogen maps mautosource maxdec maxr measures median memtype merge merror missing missover mlogic mode model modify mprint mrecall msglevel msymtabmax mvarsize myy new news no nobatch nobs nocol nocaps nocardimage nocenter nocharcode nocmdmac nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad noprint noprintinit norow norsasuser nosetinit nosource2 nosplash nosymbolgen notes notitle notitles notsorted noverbose noxsync noxwait number numkeys nummousekeys nway obs ods option order otherwise out outp= output over ovp pad pad2 page pageno pagesize paired parm parmcards path pathdll pfkey position printer probsig procleave prt ps pw pwreq quit r ranks read recfm reg register regr remote remove rename replace retain return reuse rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sashelp sasmsg sasmstore sasscript sasuser select selection separated seq serror set setcomm simple siteinfo skip sle sls sortedby sortpgm sortseq sortsize source2 splashlocation split spool start stdin stimer stop stopover sumwgt symbol symbolgen sysin sysleave sysparm sysprint sysprintfont t table tables tapeclose tbufsize terminal test then title title1 title2 title3 title4 title5 title6 title7 title8 title9 to tol tooldef trantab truncover type unformatted union until update user usericon validate value var varray varrayx vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weight when where while wincharset window work workinit workterm write x xsync xwait yearcutoff yes abs airy arcos arsin atan attrc attrn band betainv blshift bnot bor brshift bxor byte cdf ceil cexist cinv close cnonct collate compbl compound compress cos cosh css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy date datejul datepart datetime day dclose depdb depdbsl depsl depsyd deptab dequote dhms dif digamma dim dinfo dnum dopen doptname doptnum dread dropnote dsname erf erfc exist exp fappend fclose fcol fdelete fetch fetchobs fexist fget fileexist filename fileref finfo finv fipname fipnamel fipstate floor fnonct fnote fopen foptname foptnum fpoint fpos fput fread frewind frlen fsep fuzz fwrite gaminv gamma getoption getvarc getvarn hbound hms hosthelp hour ibessel index indexc indexw input inputc inputn int intck intnx intrr irr jbessel juldate kurtosis lag lbound left length lgamma libname libref log log10 log2 logpdf logpmf logsdf lowcase max mdy mean min minute mod month mopen mort n netpv nmiss normal note npv open ordinal pathname pdf peek peekc pmf point poisson poke probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probt put putc putn qtr quote ranbin rancau ranexp rangam range rannor ranpoi rantbl rantri ranuni repeat resolve reverse rewind right round saving scan sdf second sign sin sinh skewness soundex spedis sqrt std stderr stfips stname stnamel substr sum symget symput sysget sysmsg sysprod sysrc system tan tanh time timepart tinv tnonct today translate tranwrd trigamma trim trimn trunc uniform upcase uss varfmt varinfmt varlabel varlen varname varnum vartype verify weekday year yyq zipfips zipname zipnamel zipstate crosstab descript design= levels nest setot subgroup subpopn totper wsum
</Keywords>
<Keywords name="Words3">
%bquote %do %else %end %eval %global %goto %if %inc %include %index %input %length %let %list %local %macro %mend %nrbquote %nrquote %nrstr %put %qscan %qsysfunc %quote %run %substr %syscall %sysevalf %sysexec %sysfunc %sysrc %then %to %until %while %window $1 $2 $3 $4 $5 $6 $7 $8 $9 $ascii $binary $cb $char $charzb $ebcdic $hex $kanji $kanjix $msgcase $octal $phex $quote $reverj $revers $upcase $varying best binary bits bz cb char comma commax dateampm ddmmyy dollar dollarx downame eurdfdd eurdfde eurdfdn eurdfdt eurdfdwn eurdfmn eurdfmy eurdfwdx eurdfwkx float fract hex hhmm ib ieee julday julian minguo mmddyy mmss mmyy monname monyy msec negparen nengo numx octal pd pdjulg pdjuli pdtime percent pib pk punch pvalue qtrr rb rmfdur rmfstamp roman row s370ff s370fib s370fibu s370fpd s370fpdu s370fpib s370frb s370fzd s370fzdl s370fzds s370fzdt s370fzdu smfstamp timeampm tod tu vaxrb weekdate weekdatx worddate worddatx wordf words yen yymm yymmdd yymon yyqr z zd zdb zdv
</Keywords>
<Keywords name="Words4">data=</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
<WordsStyle name="KEYWORD1" styleID="5" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
<WordsStyle name="KEYWORD2" styleID="6" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="KEYWORD3" styleID="7" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="KEYWORD4" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="COMMENT" styleID="1" fgColor="8000FF" bgColor="FFFFFF" fontName="Courier New" fontStyle="2" fontSize="10"/>
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="Courier New" fontStyle="2"/>
<WordsStyle name="NUMBER" styleID="4" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
<WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="DELIMINER1" styleID="14" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="DELIMINER2" styleID="15" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
</Styles>
</UserLang>
Tuesday, November 17, 2015
Master of statistics pre-courses
MAT 137Y (Calculus)
MAT 235Y/237Y (Multivariable Calculus)
MAT 223H/240H (Linear Algebra I)
MAT 224H/247H (Linear Algebra II)
MAT 337H (Introduction to Real Analysis)
STA 257H (Introductory Probability and
Statistics I)
STA 261H (Introductory Probability and
Statistics II)
STA 347H (Probability Theory)
STA 452H / 453H ( Introduction to
Mathematical Statistics I & II )
STA 302H (Applied Regression Analysis)
[same as STA 1001H]
STA 322H (Sample Survey Theory and its
Application) [same as STA 1003H]
STA 332H (Introduction to Experimental
Design) [same as STA 1004H]
STA 437H (Applied Multivariate Analysis)
[same as STA 2005H]
|
Methods of Applied Statistics I
|
|
|
Methods of Applied Statistics II
|
|
|
Graduate Probability I
|
|
|
Graduate Probability II
|
|
|
Mathematical Statistics I
|
|
|
Mathematical Statistics II
|
|
|
Advanced Theory of Statistics
|
project grow法
和人合作走小精尖专利之路创新,能够handle大公司的一个环节即可
要做到IT-DA的平稳切换,SQL/EXCEL, SQL BI, EXCEL BI 是桥梁
做一项事业: 在IT和软件上扩展一步,倒项目、项目管理、构建项目利益链,合包、承包劳务、分包、二包,做SubContractor
要做到IT-DA的平稳切换,SQL/EXCEL, SQL BI, EXCEL BI 是桥梁
做一项事业: 在IT和软件上扩展一步,倒项目、项目管理、构建项目利益链,合包、承包劳务、分包、二包,做SubContractor
大事靠分析, 小事靠直觉 , Financial industry
善战者,立于不败之地而后战
在生意的轨道上拙进稳赚经营
和自己专业和自己工作结合,最容易成功, 从做好自己本职工作出发
在自己手脚可及的产业(技术,难题,问题)上做文章, 可以保住饭碗,升职,跳槽, 走向远方而非瞄着远方
行行出状元的道理: 不管做什么技术,只要做精了,都能有出息,选行要知天命,不要举棋不定耽误时间
要在自己能出状元的地方争当状元,当第一名。
勇往直前、 步步推进、层层破解;做出精密的计划,计划出高效(把70-80%事情计划在内,在实践中寻优)
高效分解问题(直到可以handle难度或者可以解决子问题),Firm的解决问题
做事之前Strategy thinking, analysis/break down 然后做,三思后行;
大事靠分析小事靠直觉;必须有自己的黄金工作时间、且顺应加拿大特点;最重要的事情往前排;不断优化行动(宏观、微观)
收入较高的两种职位:金融投资分析人员 (Financial Analyst)和个人金融理财人员(Financial Advisor)
金融工程。在加拿大,这个专业的人不是太多,每个银行大约有一二十人是真正搞金融工程的,主要是搞Model的。服务对象是Risk Management和Trading Room,大多是数学、物理、金融博士,也有一些是UT,Waterloo和York的Math Finance硕士,数学能力一般都很强。
在生意的轨道上拙进稳赚经营
和自己专业和自己工作结合,最容易成功, 从做好自己本职工作出发
在自己手脚可及的产业(技术,难题,问题)上做文章, 可以保住饭碗,升职,跳槽, 走向远方而非瞄着远方
行行出状元的道理: 不管做什么技术,只要做精了,都能有出息,选行要知天命,不要举棋不定耽误时间
要在自己能出状元的地方争当状元,当第一名。
勇往直前、 步步推进、层层破解;做出精密的计划,计划出高效(把70-80%事情计划在内,在实践中寻优)
高效分解问题(直到可以handle难度或者可以解决子问题),Firm的解决问题
做事之前Strategy thinking, analysis/break down 然后做,三思后行;
大事靠分析小事靠直觉;必须有自己的黄金工作时间、且顺应加拿大特点;最重要的事情往前排;不断优化行动(宏观、微观)
收入较高的两种职位:金融投资分析人员 (Financial Analyst)和个人金融理财人员(Financial Advisor)
金融工程。在加拿大,这个专业的人不是太多,每个银行大约有一二十人是真正搞金融工程的,主要是搞Model的。服务对象是Risk Management和Trading Room,大多是数学、物理、金融博士,也有一些是UT,Waterloo和York的Math Finance硕士,数学能力一般都很强。
将自己的事业集成于本地产业集群中,获得区位优势;
和新技术结合-获得新增优势-3D打印、移动网络、大数据、机器人
避免和大企业竞争,要和大企业合作配套,加入大企业的产业链
避免“被外包”的行业:软件,视觉元器件生产
分析方法: 类似于视觉研究报告
打工到开公司策略的推理:待遇高,工作好找,工作环境好,稳定 开公司干事业: 利润高,稳定,工作强度低,业务容易开展,有潜力和前景
你进入任何圈子,只要你能找到对方需要的,而且你能找到解决他需要的方法,那么你都能获得机会、财富和幸福
一个人一生精力是有限的,是不可能什么都会的,因此你如果什么都学,那么你什么都学不会。你用30年研究透了一门技术,或者学会了一门艺术,人家用二十年读懂了销售,你不可能在人家的领域里超过人家,时间精力都不允许。最好的方法是合作。何况更多的人啥都不是,什么领域都是普通人。因此最重要的就是多交往那些优秀的人,进入优秀人的圈子。或者进入有价值人的圈子
生意的基本原理:寻找客户需求、产品力和客户数量的最大平衡值
曹操冠带辉煌,高唱:“世人害奸,我笑世人偏。为人少机变,富贵怎双全
能够在加拿大成功扎根、营运多年的华裔移民企业家,大多数人的成长过程都有惊人相似的轨迹:从底层开始,慢慢地熟悉所进入的行业、锻炼语言、明白顾客思维习惯、掌握市场营销模式、学习应对各种事物,知道加拿大政府的扶植政策,坚强不屈服
对中加两条腿走路的认识
1)机会:走入社会去变戏法、找机会
2)从赚钱角度看
要赚小钱:在CA认真工作足矣
要赚大钱:还是要把欧美先进的东西倒腾到欠发达国家
对赚钱的认识
1)抓项目就是抓经济建设:塑胶花生产、销售
2)好钢用在刀刃上,智慧用在赚钱上;直接操练赚钱的技术
3)挣钱要有好的工具和渠道
4)入对行、选好行
刘少奇;要做好工作,应该情况明,决心大,办法对
1)渠道建设:干活要有工具,挣钱要有工具、手段、渠道
发展选题: 加拿大-市场中某方面问题的专家或者专业化公司
职业的选择
- 总的来说,无非就是销售、市场、客服、物流、行政、人事、财务、技术、管理几个大类,有个有趣的现象就是,500强的CEO当中最多的是销售出身,第二多的人是财务出身
这两者加起来大概超过95%。现代IT行业也有技术出身成为老板的,但实际上,后来他们还是从事了很多销售和市场的工作,并且表现出色,公司才获得了成功,完全靠技术能力成为公司老板的,几乎没有。
- 这是有原因的,因为销售就是一门跟人打交道的学问,而管理其实也是跟人打交道的学问,这两者之中有很多相通的东西,他们的共同目标就是“让别人去做某件特定的事情。”而财务则是从数字的层面了解生意的本质,从宏观上看待生意的本质,对于一个生意是否挣钱,是否可以正常运作有着最深刻的认识
- 总的来说,无非就是销售、市场、客服、物流、行政、人事、财务、技术、管理几个大类,有个有趣的现象就是,500强的CEO当中最多的是销售出身,第二多的人是财务出身
这两者加起来大概超过95%。现代IT行业也有技术出身成为老板的,但实际上,后来他们还是从事了很多销售和市场的工作,并且表现出色,公司才获得了成功,完全靠技术能力成为公司老板的,几乎没有。
- 这是有原因的,因为销售就是一门跟人打交道的学问,而管理其实也是跟人打交道的学问,这两者之中有很多相通的东西,他们的共同目标就是“让别人去做某件特定的事情。”而财务则是从数字的层面了解生意的本质,从宏观上看待生意的本质,对于一个生意是否挣钱,是否可以正常运作有着最深刻的认识
Subscribe to:
Posts (Atom)