如何在雪花查询中使用百分比关键字

时间:2019-12-06 18:03:45

标签: sql snowflake-data-warehouse snowflake-schema

SELECT  NBR, Customers, status
FROM (
  SELECT  NBR, Customers, Code AS status
  FROM   CCC AS CS 
  INNER JOIN AAA AS AC ON CCC.B2= ACT.B1 AND CSS.B2 = ACT.B1
) AS rst
WHERE status IN ('A', 'T')
ORDER BY NBR LIMIT 100 PERCENT

1 个答案:

答案 0 :(得分:0)

我看到了你其他的帖子。不能100%地确定要执行的操作,但是您可能要考虑使用诸如ratio_to_report之类的Windows函数。请参见下面的示例。这是Windows功能的链接

https://docs.snowflake.net/manuals/sql-reference/functions-analytic.html

 return (
                                    <>
                                        <Grid container spacing={1}>
                                            <Grid item xs>
                                                <Button
                                                    size="small"
                                                    onClick={() => {
                                                        const {
                                                            ID
                                                        } = data[
                                                            tableMeta.rowIndex
                                                        ];

                                                        showAlert({
                                                            actionType:
                                                                "test",
                                                            metadata: {
                                                                id: ID
                                                            },
                                                            isFullScreen: true
                                                        });
                                                    }}>
                                                    {value}
                                                </Button>
                                            </Grid>
                                            <Grid item xs>
                                                {TypeID === 0 ||
                                                UserID ? null : (
                                                    <IconButton>
                                                        <StatusModal
                                                            details={
                                                                details
                                                            }></Modal>
                                                    </IconButton>
                                                )}
                                            </Grid>
                                        </Grid>
                                    </>
                                );