2024-09-28 21:39:02 发布
网友
select substr(word,1,1) as alpha, count(*) as count from words group by substr(word,1,1);
我想在PonyORM中实现这个,有人能帮我写查询语句吗?提前谢谢
其实很简单
query = select( (w.word[0], count()) for w in Words )
科兹洛夫斯基在github上回答
关于使用这个查询对象:
char_count_pair = list(query) for start_char, c in char_count_pair: print('char:', start_char, ', count:', c)
其实很简单
科兹洛夫斯基在github上回答
关于使用这个查询对象:
相关问题 更多 >
编程相关推荐