牛客727894600号
牛客727894600号
全部文章
分类
题解(24)
归档
标签
去牛客网
登录
/
注册
牛客727894600号的博客
全部文章
(共37篇)
题解 | #浙大不同难度题目的正确率#
SELECT qd.difficult_level, SUM(IF (result = 'right', 1, 0)) / COUNT(qpd.device_id) AS correct_rate FROM question_detail AS qd LEFT JOI...
2023-08-24
1
273
题解 | #统计复旦用户8月练题情况#
SELECT up.device_id, up.university, count(question_id) AS question_cnt, SUM(IF(qpd.result = 'right', 1, 0)) AS right_question_cnt FRO...
2023-08-24
1
292
题解 | #检索每个顾客的名称和所有的订单号(一)#
方法一: SELECT C.cust_name, O.order_num FROM Customers AS C INNER JOIN Orders AS O ON O.cust_id = C.cust_id ORDER BY C.cust_name AS...
2023-08-23
1
399
题解 | #返回顾客名称和相关订单号#
方法一:SELECT C.cust_name, O.order_numFROM Customers AS C, Orders AS OWHERE C.cust_id = O.cust_idORDER BY C.cust_name ASC, O.order_n...
2023-08-22
1
411
从Products表中检索所有的产品名称以及对应的销售总数
方法一:SELECT p.prod_name, st.quant_soldFROM Products AS p LEFT JOIN ( SELECT prod_id, SUM(quantity) AS quant_so...
2023-08-22
2
460
返回购买prod_id为BR01 的产品的所有顾客的电子邮件
方法一:SELECT cust_emailFROM Customers AS C LEFT JOIN Orders AS O ON C.cust_id = O.cust_id LEFT JOIN OrderItems AS ot ON ot.order_num = O.ord...
2023-08-21
1
386
题解 | #统计字符#
import re def my_func(in_str): alphabet = len(re.findall("[a-zA-Z]+?", in_str)) white_space = len(re.findall("\s"...
Python3
2021-12-13
1
395
题解 | #单词倒排#
import re def my_func(in_str): res = re.sub("[^a-zA-Z]", " ", in_str) res = " ".join(res.split(" ")[::-1]) ...
Python3
2021-12-13
1
360
题解 | #查找组成一个偶数最接近的两个素数#
def eval_num(num): "to judge if a particular number is prime number" ...
Python3
2021-10-30
1
593
题解 | #完全数计算#
def my_func(num): co = 0 for i in range(1, int(num) + 1):...
Python3
2021-10-30
1
432
首页
上一页
1
2
3
4
下一页
末页