sqlÖг£¼ûµÄ¾ÛºÏº¯ÊýÓÐÄÄЩ
sql Öг£¼ûµÄ¾ÛºÏº¯ÊýÓÃÓÚƾ֤һ×éÖµÅÌËãµ¥¸öÖµ£¬Ïêϸ°üÀ¨£ºcount£ºÅÌËã·Ç¿ÕÖµµÄ¸öÊýsum£ºÅÌËãÊýÖµ×ܺÍavg£ºÅÌËãƽ¾ùÖµmin£º·µ»Ø×îСֵmax£º·µ»Ø×î´óÖµdistinct count£ºÅÌËãΨһֵµÄ¸öÊýgroup_concat£º½«ÖµÅþÁ¬³É×Ö·û´®stdev£ºÅÌËã±ê×¼Îó²îvariance£ºÅÌËã·½²îmedian£ºÅÌËãÖÐÑëÖµ
SQL Öг£¼ûµÄ¾ÛºÏº¯Êý
¾ÛºÏº¯ÊýÓÃÓÚƾ֤һ×éÖµÅÌËãµ¥¸öÖµ£¬ËüÃÇÔÚÊý¾ÝÆÊÎöºÍ·Ö×éÅÌÎÊÖкÜÊÇÓÐÓá£ÔÚ SQL ÖУ¬³£¼ûµÄ¾ÛºÏº¯Êý°üÀ¨£º
1. COUNT
ÅÌËãÒ»×éÖµÖзǿÕÖµµÄ¸öÊý¡£
Óï·¨£ºCOUNT(expression)
2. SUM
ÅÌËãÒ»×éÊýÖµµÄ×ܺ͡£
Óï·¨£ºSUM(expression)
3. AVG
ÅÌËãÒ»×éÊýÖµµÄƽ¾ùÖµ¡£
Óï·¨£ºAVG(expression)
4. MIN
·µ»ØÒ»×éÖµÖеÄ×îСֵ¡£
Óï·¨£ºMIN(expression)
5. MAX
·µ»ØÒ»×éÖµÖеÄ×î´óÖµ¡£
Óï·¨£ºMAX(expression)
6. DISTINCT COUNT
ÅÌËãÒ»×éÖµÖÐΨһֵµÄ¸öÊý¡£
Óï·¨£ºDISTINCT COUNT(expression)
7. GROUP_CONCAT
½«Ò»×éÖµÅþÁ¬³ÉÒ»¸ö×Ö·û´®£¬²¢Ê¹ÓÃÖ¸¶¨µÄÍÑÀë·ûÍÑÀë¡£
Óï·¨£ºGROUP_CONCAT(expression, [separator])
8. STDEV
ÅÌËãÒ»×éÖµµÄ±ê×¼Îó²î¡£
Óï·¨£ºSTDEV(expression)
9. VARIANCE
ÅÌËãÒ»×éÖµµÄ·½²î¡£
Óï·¨£ºVARIANCE(expression)
10. MEDIAN
ÅÌËãÒ»×éÖµµÄÖÐÑëÖµ¡£
Óï·¨£ºMEDIAN(expression)
ÒÔÉϾÍÊÇsqlÖг£¼ûµÄ¾ÛºÏº¯ÊýÓÐÄÄЩµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡