sql - Presto SQL 想在所有列上使用一个函数,如何不将它们一一列出?
问题描述
假设我想要这样的输出:
是否可以在不明确写出所有 100 个列名的情况下复制它?
select main,
count(distinct col1),
count(distinct col2),
...
count(distinct col100),
from table
group by main
解决方案
推荐阅读
- php - 将数据作为数组传递 - PHP
- excel - SSRS 报告导出到 HH:mm:ss 格式的 excel 问题
- .net - 无法使用 office js 读取锁定的单元格值
- biztalk - BizTalk 中的 MSI 导出文件与预期不同
- windows - 如何在 Windows 中运行 json-server?
- react-native - Android 应用显示带有发布版本的调试选项
- python - pd.read_html 找不到我在 pycharm 中安装的软件包如何让它识别它们
- angular - 项目之间共享的Angular 7类/结构/接口
- reactjs - 如何使用 react-redux-firebase 将 'auth' 或 'profile' 对象传递给 firestoreConnect()?
- xml - 如何在 XML 中指定“或”?