我有一张像这样的桌子
\n\ncol1ID col2String Col3ID Col4String Col5Data\n 1 xxx 20 abc 14-09-2018\n 1 xxx 20 xyz 14-09-2018\n 2 xxx 30 abc 14-09-2018\n 2 xxx 30 abc 14-09-2018 \n
Run Code Online (Sandbox Code Playgroud)\n\n我想添加列来计算 col4String 组中按 col1ID 和 col3ID 有多少个不同的字符串。
\n\n所以像
\n\nCOUNT(DISTINCT (Col4String)) over (partition by col1ID, col3ID)\n
Run Code Online (Sandbox Code Playgroud)\n\n但它不起作用,我收到一个错误
\n\n\n\n\nOVER 子句中不允许使用 DISTINCT。
\n
\n 消息 102,级别 15,状态 1,第 23 行。
我有更多列,如 col2String、col5Data 但它们应该 \xc2\xb4t 受到影响,所以我不能在 的开头使用 unique SELECT
,并且dense_rank()
doen\xc2\xb4t 似乎也适用于我的情况。
谢谢你的帮助。
\n我正在使用Grid
Material UI。我不知道为什么网格项目内的图像向左对齐而不是向中心对齐。
<Grid container direction="row" justify="center" alignItems="center">
<Grid item xs={6}>
<Grid container direction="row" justify="center" alignItems="center" alignContent="center" style={{minHeight:"200px"}} >
<Grid item xs={12}>
<Typography style={{color:'white', textAlign:'center', fontSize:'2rem'}}>{name}</Typography>
</Grid>
<Grid item xs={6}>
<a href={github} target="_blank">
<img src={githubIcon} width="32px" height="32px" color="white"/>
</a>
</Grid>
</Grid>
</Grid>
</Grid>
Run Code Online (Sandbox Code Playgroud)
同样在版式中,我必须使用它textAlign
来居中,但如何对齐图像?