Çë½Ì£¬ÎÒÏëÖªµÀÒ»ÌìÄÚÿ¸öСʱÄÚÉÏÏßµÄ×ÜÈËÊý£¬ÇëÎʸÃÈçºÎȥд£¬ÄÜ·ñ¸ø¸öÀý¾ä»òÕßÂß¼£¬Ð»Ð»¡£MSSQLÓï¾äÈçÏ£º select convert(varchar(13),ʱ¼ä×Ö¶Î,121),count(×Ö¶Î) from ±í group by convert(varchar(13),ʱ¼ä×Ö¶Î,121)
MySql¿ÉÄܲ»ÊÇÕâÑùдµÄ¡£ select date_format(ʱ¼ä×Ö¶Î,'%Y-%m-%d &H'),count(×Ö¶Î) from ±í group by date_format(ʱ¼ä×Ö¶Î,'%Y-%m-%d &H') ÓÃÁÙʱ±í£¬±£´æ1-24ʱ£¬ÔÙÓ빤×÷±íÁ¬½Ó лл¥ÉÏÁ½Î»£¬µ«ÊÇÓÖ¸öÕâÑùµÄÎÊÌ⣬ÎÒÏÖÔÚÓÐÁ½¸ö×ֶΣ¬logintimeºÍloginout×ֶΣ¬ÎÒÐèÒª¼ÆËã³öÓû§ÊÇÔÚʲôʱºòµÇ½ºÍʲôʱºòµÇ³ö£¬ÔÚµÇÈëºÍµÇ³öµÄʱ¼ä¶Î²ÅÊÇÕæÕýÔÚÏßµÄʱ¼ä¶Î£¬ÊÇ·ñÐèÒª½øÐÐʱ¼ä²î¼ÆË㣿лл¡£ ÏÂÃæÊÇÎÒдµÄSQL£¬Çë¿´¿´£¬×ܾõµÃÊý¾Ý²»¶Ô select case when right(login_time,2) >= '00' and right(logout_time,2) < '01' then '00:00' when right(login_time,2) >= '01' and right(logout_time,2) < '02' then '01:00' when right(login_time,2) >= '02' and right(logout_time,2) < '03' then '02:00' when right(login_time,2) >= '03' and right(logout_time,2) < '04' then '03:00'  
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001' ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......