select round(time),count(distinct no) from t group by round(time); rond(time) 返回的是天数
round(time)不是返回天数吧,而是 ROUND returns date rounded to the unit specified by the format model fmt. This function is not sensitive to the NLS_CALENDAR session parameter. It operates according to the rules of the Gregorian calendar. The value returned is always of data type DATE, even if you specify a different datetime data type for date. If you omit fmt, then date is rounded to the nearest day. The date expression must resolve to a DATE value. 引用自:http://docs.oracle.com/cd/E11882_01/server.112/e10592/functions154.htm#SQLRF51710
select substr(t.time,1,10),count(distinct no) from table_name t group by substr(t.time,1,8);
rond(time) 返回的是天数
ROUND returns date rounded to the unit specified by the format model fmt. This function is not sensitive to the NLS_CALENDAR session parameter. It operates according to the rules of the Gregorian calendar. The value returned is always of data type DATE, even if you specify a different datetime data type for date. If you omit fmt, then date is rounded to the nearest day. The date expression must resolve to a DATE value.
引用自:http://docs.oracle.com/cd/E11882_01/server.112/e10592/functions154.htm#SQLRF51710