SQL-在计数之前减少数据 - 子查询
我有一个带有多个列的表,其中一列被命名为softwareVersion
。此列可以为空,其默认值为null
。
我的数据集约为2650万行,因此我想在计数之前将其减少。
因此,我从数据库中选择 *,其中“软件Version”不是null
,它正常工作。
从减少的行集合中,我想要count(SoftwareVersion)
。
我在想一个子查询,但无法弄清楚如何适当地为我的情况做到这一点。
I have a table with multiple columns and one of them is named SoftwareVersion
. This column can be empty and its default value is NULL
.
My dataset is around 26.5 million rows so I would like to reduce it before counting.
So I SELECT * FROM Database WHERE "SoftwareVersion" IS NOT NULL
which is working perfectly.
From the reduced set of rows I want to COUNT(SoftwareVersion)
.
I was thinking of a subquery but can´t figure out how to do this properly for my scenario.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论