Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个这样的数据库:
姓名、日期、通话
天代表日期,呼叫数代表他们拨打的电话数。是否有一种 SQL 语法可以返回当天的通话总数?我假设它的 COUNT DISTINCT 但我不能让它返回例如两个人的实例,同一天,返回应该是两者的总数。
SELECT Day, SUM(Calls) FROM table GROUP BY Day;