row_number() over (partition by)验证不通过,但实际可以执行
æè¿°
对é®é¢ç®åæ¸
æ°çæè¿°
row_number() over (partition by)å¨checkçæ¶åä¸éè¿ä¼æ¥éï¼ä½å®é
è¿ä¸ªè¯å¥æ¯å¯ä»¥æ§è¡ï¼å¹¶ä¸ä¹å¯ä»¥å¨æ°æ®åºä¸æ§è¡
éç°
模æéç°çæ¥éª¤
-- å建表
CREATE TABLE a (
ID INT(10) NULL DEFAULT NULL,
class INT(10) NULL DEFAULT NULL,
score INT(10) NULL DEFAULT NULL
)COLLATE='utf8_general_ci';
-- æå ¥æ°æ® insert into a values (1,1,90); insert into a values (2,1,70); insert into a values (3,1,90); insert into a values (4,1,80); insert into a values (5,2,100); insert into a values (6,2,80); insert into a values (7,2,110); insert into a values (8,2,80); insert into a values (9,2,80); insert into a values (10,2,60); commit;
#!/usr/bin/env python
-- coding: utf-8 --
import pymysql import prettytable as pt
tb = pt.PrettyTable()
sql = '''/*--user=fabu;--password=123456;--host=10.211.55.5;--port=3306;--check=1; */ inception_magic_start; use test; select *,row_number() over (partition by class order by score desc) rn from a; innception_magic_commit;'''
conn = pymysql.connect(host='127.0.0.1', user='', passwd='', db='', port=4000, charset='utf8mb4')
cur = conn.cursor() ret = cur.execute(sql) result = cur.fetchall() cur.close() conn.close() tb.field_names = [i[0] for i in cur.description] for i in result: tb.add_row(i) print(tb)
使ç¨ä»¥ä¸æ°æ®ä»¥åè¡¨ç»æåèæ¬æ§è¡ ç¯å¢
- æ°æ®åº: [mysql/mariadb]
- çæ¬: [ä¾å¦ 8.0.21]
åæ° å¯è½ä¸é®é¢ç¸å ³çè®¾ç½®åæ°
可以看下我fork的分支,有增加这块功能https://gitee.com/zhoujin826/goInception
我下载了该分支,但是无法进行二进制安装依旧会有报错
zmix999 @.***> 于2024年2月18日周日 07:12写道:
可以看下我fork的分支,有增加这块功能https://gitee.com/zhoujin826/goInception
— Reply to this email directly, view it on GitHub https://github.com/hanchuanchuan/goInception/issues/634#issuecomment-1950518079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3BZSR55XEGCMOYNUCDPF3YUE2NRAVCNFSM6AAAAABC3HN7ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGUYTQMBXHE . You are receiving this because you authored the thread.Message ID: @.***>
是下载了这个分支在源码编译的吗,或者晚些我上传个二进制包
是在你源码分支上下载编译的,相关的报错我也在你的gitee上提了issue了,你可以看下
zmix999 @.***> 于2024年2月18日周日 17:07写道:
是下载了这个分支在源码编译的吗,或者晚些我上传个二进制包
— Reply to this email directly, view it on GitHub https://github.com/hanchuanchuan/goInception/issues/634#issuecomment-1951036977, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3BZSRQOBYDCVCJ3SNZWKDYUHAGBAVCNFSM6AAAAABC3HN7ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGAZTMOJXG4 . You are receiving this because you authored the thread.Message ID: @.***>
代码没上传完成,已重新上传
也上传了二进制程序