扫码关注官方订阅号
认证0级讲师
大概思路
select (close-open) as useTime from (select case when openTime<3600*i then 3600*i else openTime end as open,case when closeTime >3600*i+3600 then 3600*i+3600 else closeTime end as close from tabel where openTime <= 3600*I and closeTime>=3600*i )
好久没写sql了,语句不知道会不会有问题
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
大概思路
好久没写sql了,语句不知道会不会有问题