GinaZhai commented on a change in pull request #452: KYLIN-3766 Add docs for Query SQL Grammar, Function and Data Type URL: https://github.com/apache/kylin/pull/452#discussion_r252090537
########## File path: website/_docs/tutorial/kylin_function.cn.md ########## @@ -0,0 +1,219 @@ +--- +layout: docs-cn +title: "SQL 函数" +categories: tutorial +permalink: /cn/docs/tutorial/kylin_function.html +--- + +## 函数 + +[COUNT](#COUNT) + [COUNT(COLUMN)](#COUNT_COLUMN) + [COUNT(*)](#COUNT_) +[COUNT_DISTINCT](#COUNT_DISTINCT) +[EXTENDED_COLUMN](#EXTENDED_COLUMN) +[MAX](#MAX) +[MIN](#MIN) +[PERCENTILE](#PERCENTILE) +[SUM](#SUM) +[TOP_N](#TOP_N) + +[WINDOW](#WINDOW) + [ROW_NUMBER](#ROW_NUMBER) + [AVG](#AVG) + [RANK](#RANK) + [DENSE_RANK](#DENSE_RANK) + [FIRST_VALUE](#FIRST_VALUE) + [LAST_VALUE](#LAST_VALUE) + [LAG](#LAG) + [LEAD](#LEAD) + [NTILE](#NTILE) + [CASE WHEN](#CASEWHEN) + [CAST](#CAST) + +[SUSTRING](#SUBSTRING) +[COALESCE](#COALESCE) + + +## COUNT {#COUNT} +用于返回与指定条件匹配的行数。 + +### COUNT(COLUMN) {#COUNT_COLUMN} + +例子: +{% highlight Groff markup %} +SELECT COUNT(seller_id) FROM kylin_sales; +{% endhighlight %} + +### COUNT(*) {#COUNT_} + +例子: +{% highlight Groff markup %} +SELECT COUNT(*) FROM kylin_sales; +{% endhighlight %} + + +## COUNT_DISTINCT {#COUNT_DISTINCT} + +例子: +{% highlight Groff markup %} +SELECT COUNT(DISTINCT seller_id) AS DIST_SELLER FROM kylin_sales; +{% endhighlight %} + +## EXTENDED_COLUMN {#EXTENDED_COLUMN} Review comment: ok ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services