酷代码 AI
菜单
服务商

SQL 查询纠错:精准修正排序子句,实现特定数据筛选与排序

It seems like there's a typo in the SQL query, specifically in the `order by` clause. Assuming you meant to order by `date_time`, the corrected query should look like this: ```sql SELECT device_id, touint8orzero(jsonextractstring(bl.param, 'userbehaviortype')) as userbehaviortype, code, date_time as "time", row_number() over ( partition by device_id ORDER BY date_time ) as "sort" FROM fl_dwm_bury_log bl WHERE bl.os_version = 13 AND bl.code != 'user_active_common_service_point' AND bl.day >= 20240514 AND bl.day <= 20240514 AND userbehaviortype = 1 AND bl.device_id = '17156129439657919217' ORDER BY bl.device_id, date_time; ``` This query selects specific columns from the `fl_dwm_bury_log` table, filters rows based on the given conditions, and orders the results by `device_id` and `date_time`. ######[AI写代码神器 | 262点数解答 | 2024-05-14 11:17:48]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]