随笔分类 -  mysql

leetcode-1251-平均售价
摘要:链接: 1251. 平均售价 - 力扣(LeetCode) 前提条件: 查看代码 CREATE TABLE Prices ( product_id INT, start_date DATE, end_date DATE, price INT ); -- 插入数据 INSERT INTO Prices 阅读全文

posted @ 2024-10-30 15:59 珂k 阅读(50) 评论(0) 推荐(0)

leetcode-1934-确认率
摘要:链接:1934. 确认率 - 力扣(LeetCode) 前提条件: Signups + + + | Column Name | Type | + + + | user_id | int | | time_stamp | datetime | + + + User_id是该表的主键。 每一行都包含ID 阅读全文

posted @ 2024-10-26 09:32 珂k 阅读(61) 评论(0) 推荐(0)

leetcode-1280-学生参加各科测试的次数
摘要:链接:1280. 学生们参加各科测试的次数 - 力扣(LeetCode) 前提条件: 学生表: Students + + + | Column Name | Type | + + + | student_id | int | | student_name | varchar | + + + 在 SQ 阅读全文

posted @ 2024-10-25 09:30 珂k 阅读(69) 评论(0) 推荐(0)

内连接、左连接、右连接图示及语法
摘要:一、内连接 同时将两表作为参考对象,根据ON(或WHERE)后给出的两表的条件将两表连接起来。结果是满足连接条件的交集即A∩B={x∣x∈A∧x∈B} 显式内连接(使用JOIN... ON关键字) SELECT columns FROM table1 JOIN table2 ON table1.co 阅读全文

posted @ 2024-10-24 16:28 珂k 阅读(135) 评论(0) 推荐(0)

Mysql出现连接错误解决办法
摘要:一、显示 二、原因分析 出现这个错误的原因是MySQL 8 之前的版本中加密规则是mysql_native_password,而在MySQL 8之后,加密规则是caching_sha2_password。 三、解决办法 升级连接客户端 还原加密规则为mysql_native_password ALT 阅读全文

posted @ 2024-10-24 12:59 珂k 阅读(72) 评论(0) 推荐(0)

leetcode-1661-每台机器的平均运行时间
摘要:链接:1661. 每台机器的进程平均运行时间 - 力扣(LeetCode) 前提条件: 表: Activity + + + | Column Name | Type | + + + | machine_id | int | | process_id | int | | activity_type | 阅读全文

posted @ 2024-10-24 10:36 珂k 阅读(60) 评论(0) 推荐(0)

leetcode-197-上升的温度
摘要:链接:197. 上升的温度 - 力扣(LeetCode) 前提条件: 表: Weather + + + | Column Name | Type | + + + | id | int | | recordDate | date | | temperature | int | + + + id 是该表 阅读全文

posted @ 2024-10-24 09:55 珂k 阅读(35) 评论(0) 推荐(0)

leetcode-1581- 进店却未进行过交易的顾客
摘要:链接:1581. 进店却未进行过交易的顾客 - 力扣(LeetCode) 前提条件: 表:Visits + + + | Column Name | Type | + + + | visit_id | int | | customer_id | int | + + + visit_id 是该表中具有唯 阅读全文

posted @ 2024-10-24 09:15 珂k 阅读(117) 评论(0) 推荐(0)