MySQL基礎關鍵_007_DQL 練習

目? 錄

一、題目

二、答案(不唯一)

1.查詢每個部門薪資最高的員工信息

2.查詢每個部門高于平均薪水的員工信息

3.?查詢每個部門平均薪資等級

4.查詢部門中所有員工薪資等級的平均等級

5.不用分組函數 max 查詢最高薪資

6.查詢平均薪資最高的部門編號

7.查詢平均薪資最高的部門名稱

8.?查詢平均薪資等級最低的部門名稱

9.查詢比普通員工中最高薪資更高的領導信息

10.?查詢薪資排名前五的員工信息

11.查詢薪資排名第六到第十的員工信息

12.查詢最后三名入職的員工信息

13.查詢每個薪資等級各有多少人

14.查詢所有員工及其領導姓名

15.查詢入職日期早于其直屬領導的員工信息

16.?查詢每個部門內有哪些員工

17.查詢至少有五個員工的部門

18.?查詢薪資比“SMITH”多的員工

19.查詢所有職位是“CLERK”的員工姓名、部門名稱、部門人數

20.查詢最低薪資大于1500的職位的員工人數

21.查詢在“SALES”部門工作的員工

22.查詢薪資高于平均薪資的員工及其所屬部門、直屬領導、薪資等級

23.查詢與“SCOTT”相同職位的員工及所屬部門名稱

24.查詢薪資與部門“30”薪資相同的其他員工信息

25.?查詢薪資高于部門“30”薪資的其他員工及所屬部門名稱

26. 查詢每個部門的員工數量、平均薪資、平均入職時長

27.查詢全體員工的姓名、薪資、部門名稱

28.查詢所有部門詳細信息及其人數

29.查詢各職位最低薪資及其員工姓名

30.查詢各部門職位為“MANAGER”的最低薪資

31.查詢全體員工的年收入,升序排列

32.查詢薪資高于3000的領導及其下屬

33.查詢名稱中包含“s”?的部門及其總員工薪資、人數

34.查詢入職40年以上的員工,并計算為其加薪10%后的薪資

35.綜合題

(1)?查詢未選過“黎明”老師的所有學生的姓名

(2)列出 2 門以上(含2門)不及格學生姓名及平均成績

(3)既選過 1 號課程又選過 2 號課所有學生的姓名


一、題目

  1. 查詢每個部門薪資最高的員工信息

  2. 查詢每個部門高于平均薪水的員工信息

  3. 查詢每個部門平均薪資等級

  4. 查詢部門中所有員工薪資等級的平均等級

  5. 不用分組函數 max 查詢最高薪資

  6. 查詢平均薪資最高的部門編號

  7. 查詢平均薪資最高的部門名稱

  8. 查詢平均薪資等級最低的部門名稱

  9. 查詢比普通員工中最高薪資更高的領導信息

  10. 查詢薪資排名前五的員工信息

  11. 查詢薪資排名第六到第十的員工信息

  12. 查詢最后三名入職的員工信息

  13. 查詢每個薪資等級各有多少人

  14. 查詢所有員工及其領導姓名

  15. 查詢入職日期早于其直屬領導的員工信息

  16. 查詢每個部門內有哪些員工

  17. 查詢至少有五個員工的部門

  18. 查詢薪資比“SMITH”多的員工

  19. 查詢所有職位是“CLERK”的員工姓名、部門名稱、部門人數

  20. 查詢最低薪資大于1500的職位的員工人數

  21. 查詢在“SALES”部門工作的員工

  22. 查詢薪資高于平均薪資的員工及其所屬部門、直屬領導、薪資等級

  23. 查詢與“SCOTT”相同職位的員工及所屬部門名稱

  24. 查詢薪資與部門“30”薪資相同的其他員工信息

  25. 查詢薪資高于部門“30”薪資的其他員工及所屬部門名稱

  26. 查詢每個部門的員工數量、平均薪資、平均入職時長

  27. 查詢全體員工的姓名、薪資、部門名稱

  28. 查詢所有部門詳細信息及其人數

  29. 查詢各職位最低薪資及其員工姓名

  30. 查詢各部門職位為“MANAGER”的最低薪資

  31. 查詢全體員工的年收入,升序排列

  32. 查詢薪資高于3000的領導及其下屬

  33. 查詢名稱中包含“s”?的部門及其總員工薪資、人數

  34. 查詢入職40年以上的員工,并計算為其加薪10%后的薪資

  35. 綜合題

    1. 查詢未選過“黎明”老師的所有學生的姓名

    2. 列出 2 門以上(含2門)不及格學生姓名及平均成績

    3. 既選過 1 號課程又選過 2 號課所有學生的姓名


二、答案(不唯一)

1.查詢每個部門薪資最高的員工信息

-- 1
select dept_no, max(salary) max_salary from employees group by dept_no-- sum
select m.*, e.emp_name, e.salary from (select dept_no, max(salary) max_salary from employees group by dept_no) m join employees e where m.dept_no = e.dept_no and m.max_salary = e.salary;


2.查詢每個部門高于平均薪水的員工信息

-- 1
select dept_no, avg(salary) average_salary from employees group by dept_no;-- sum 
select a.*, e.emp_name, e.salary from (select dept_no, avg(salary) average_salary from employees group by dept_no) a join employees e on e.dept_no = a.dept_no and e.salary > a.average_salary;


3.?查詢每個部門平均薪資等級

-- 1
select dept_no, avg(salary) as average_salary from employees group by dept_no;-- sum
select a.*, s.grade from (select dept_no, avg(salary) as average_salary from employees group by dept_no) a join salary_grades s on a.average_salary between s.min_salary and s.max_salary;


4.查詢部門中所有員工薪資等級的平均等級

select e.dept_no, avg(s.grade) from employees e join salary_grades s on e.salary between s.min_salary and s.max_salary group by e.dept_no;


5.不用分組函數 max 查詢最高薪資

# 方法一
select salary from employees order by salary desc limit 1;# 方法二-- 1
select distinct low.salary from employees low join employees hig on low.salary < hig.salary;-- sum 
select salary from employees where salary not in(select distinct low.salary from employees low join employees hig on low.salary < hig.salary);


6.查詢平均薪資最高的部門編號

# 方法一-- 1
select dept_no, avg(salary) as average_salary from employees group by dept_no;-- 2
select avg(salary) as average_salary from employees group by dept_no order by average_salary desc limit 1 ;-- sum
select dept_no, round(avg(salary), 4) as average_salary from employees group by dept_no having round(avg(salary), 4) = (select round(avg(salary), 4) as average_salary from employees group by dept_no order by average_salary desc limit 1);# 方法二-- 1
select dept_no, avg(salary) as average_salary from employees group by dept_no;-- 2
select max(average_salary) from (select dept_no, avg(salary) as average_salary from employees group by dept_no) h;-- sum
select dept_no, round(avg(salary), 4) as average_salary from employees group by dept_no having round(avg(salary), 4) = (select max(average_salary) from (select dept_no, round(avg(salary), 4) as average_salary from employees group by dept_no) h);


7.查詢平均薪資最高的部門名稱

select d.dept_name, round(avg(e.salary), 4) as average_salary 
from employees e
join departments d
one.dept_no = d.dept_no
group by d.dept_name
having round(avg(salary), 4) = (
select round(avg(salary), 4) as average_salary 
from employees 
group by dept_no 
order by average_salary desc 
limit 1);


8.?查詢平均薪資等級最低的部門名稱

-- 1.按照部門名稱查詢各部門平均薪水
select d.dept_name, avg(e.salary) as average_salary from employees e join departments d on e.dept_no = d.dept_no group by dept_name;-- 2.查詢對應的薪資等級
select t.*, s.grade from (select d.dept_name, avg(e.salary) as average_salary from employees e join departments d on e.dept_no = d.dept_no group by dept_name) t join salary_grades s on t.average_salary between s.min_salary and s.max_salary;-- 3.查詢最低部門平均薪資
select avg(salary) as average_salary from employees group by dept_no order by average_salary asc limit 1;-- 4.查詢最低部門平均薪資等級
select grade from salary_grades where (select avg(salary) as average_salary from employees group by dept_no order by average_salary asc limit 1) between min_salary and max_salary;-- 5.sum
select t.*, s.grade 
from (select d.dept_name, avg(e.salary) as average_salary from employees e join departments d on e.dept_no = d.dept_no group by dept_name) t 
join salary_grades s 
on t.average_salary 
between s.min_salary 
and s.max_salary
wheres.grade = (select grade from salary_grades where (select avg(salary) as average_salary from employees group by dept_no order by average_salary asc limit 1) between min_salary and max_salary); 


9.查詢比普通員工中最高薪資更高的領導信息

-- 1
select max(salary) from employees where emp_no not in(select distinct manager_id from employees where manager_id is not null);-- sum
select emp_name, salary from employees where salary > (select max(salary) from employees where emp_no not in(select distinct manager_id from employees where manager_id is not null));


10.?查詢薪資排名前五的員工信息

select emp_name, salary from employees order by salary desc limit 5;


11.查詢薪資排名第六到第十的員工信息

select emp_name, salary from employees order by salary desc limit 5, 5;


12.查詢最后三名入職的員工信息

select emp_name, hire_date from employees order by hire_date desc limit 3;


13.查詢每個薪資等級各有多少人

select s.grade, count(*) from employees e join salary_grades s on e.salary between s.min_salary and s.max_salary group by s.grade;


14.查詢所有員工及其領導姓名

select ee.emp_name as employee, er.emp_name as employer from employees ee left join employees er on ee.manager_id = er.emp_no;


15.查詢入職日期早于其直屬領導的員工信息

select ee.emp_name as employee, ee.hire_date, er.emp_name as employer, er.hire_date from employees ee join employees er on ee.manager_id = er.emp_no where ee.hire_date < er.hire_date;


16.?查詢每個部門內有哪些員工

select d.dept_name, e.emp_name from departments d left join employees e on d.dept_no = e.dept_no;


17.查詢至少有五個員工的部門

select d.dept_name, count(*) from departments d join employees e on d.dept_no = e.dept_no group by d.dept_name having count(*) >= 5;


18.?查詢薪資比“SMITH”多的員工

select emp_name, salary from employees where salary > (select salary from employees where emp_name = 'SMITH');


19.查詢所有職位是“CLERK”的員工姓名、部門名稱、部門人數

-- 1
select e.emp_name, d.dept_name from employees e join departments d on e.dept_no = d.dept_no where job_title = 'CLERK';-- 2
select dept_no, count(*) as total from employees group by dept_no;-- sum
select e.emp_name, d.dept_name, t.total from employees e join departments d on e.dept_no = d.dept_no join (select dept_no, count(*) as total from employees group by dept_no) t on d.dept_no = t.dept_no where job_title = 'CLERK';


20.查詢最低薪資大于1500的職位的員工人數

select job_title, count(*) from employees group by job_title having min(salary) > 1500;


21.查詢在“SALES”部門工作的員工

-- 1
select dept_no from departments where dept_name = 'SALES';-- 2
select emp_name from employees where dept_no = (select dept_no from departments where dept_name = 'SALES');


22.查詢薪資高于平均薪資的員工及其所屬部門、直屬領導、薪資等級

-- 1.員工所屬部門
select e.emp_name, d.dept_name from employees e join departments d on e.dept_no = d.dept_no;-- 2.員工直屬領導
select ee.emp_name, er.emp_name from employees ee left join employees er on ee.manager_id = er.emp_no;-- 3.員工薪資等級
select e.emp_name, s.grade from employees e join salary_grades s on e.salary between s.min_salary and s.max_salary;-- 4.匯總上述
select d.dept_name, ee.emp_name as employee, er.emp_name as employer, s.grade as employee_salary_grade from employees ee join departments d on ee.dept_no = d.dept_no left join employees er on ee.manager_id = er.emp_no join salary_grades s on ee.salary between s.min_salary and s.max_salary;-- 5.平均薪資
select avg(salary) from employees;-- 5.高于平均薪資的
select d.dept_name, ee.emp_name as employee, er.emp_name as employer, s.grade as employee_salary_grade 
from employees ee 
join departments d 
on ee.dept_no = d.dept_no 
left join employees er 
on ee.manager_id = er.emp_no 
join salary_grades s 
on ee.salary 
between s.min_salary and s.max_salary 
where ee.salary > (select avg(salary) from employees);


23.查詢與“SCOTT”相同職位的員工及所屬部門名稱

-- 1.查詢“SCOTT”的職位
select job_title from employees where emp_name = 'SCOTT';-- 2.查詢同職位員工信息
select emp_name, dept_no from employees where job_title = (select job_title from employees where emp_name = 'SCOTT');-- 3.查詢對應部門名稱并排除“SCOTT”
select t.emp_name, d.dept_name from (select emp_name, dept_no from employees where job_title = (select job_title from employees where emp_name = 'SCOTT')) t join departments d on t.dept_no = d.dept_no where t.emp_name != 'SCOTT';


24.查詢薪資與部門“30”薪資相同的其他員工信息

-- 1.查詢部門“30”薪資有哪些
select distinct salary from employees where dept_no = '30';-- 3.查詢薪資相同的其他員工
select emp_name, salary from employees where salary in(select distinct salary from employees where dept_no = '30') and dept_no != '30';


25.?查詢薪資高于部門“30”薪資的其他員工及所屬部門名稱

-- 1
select max(salary) from employees where dept_no = '30';-- 2
select d.dept_name, e.emp_name, e.salary from employees e join departments d on e.dept_no = d.dept_no where e.salary > (select max(salary) from employees where dept_no = '30') and d.dept_no != '30';


26. 查詢每個部門的員工數量、平均薪資、平均入職時長

select d.dept_name, count(e.emp_name) as total_person, ifnull(avg(salary), 0) as average_salary, ifnull(avg(datediff(now(), e.hire_date)), 0) as average_date 
from departments d 
left join employees e 
on d.dept_no = e.dept_no 
group by d.dept_name;


27.查詢全體員工的姓名、薪資、部門名稱

select e.emp_name, e.salary, d.dept_name from employees e join departments d on e.dept_no = d.dept_no;


28.查詢所有部門詳細信息及其人數

select d.*, count(e.emp_name) from employees e right join departments d on e.dept_no = d.dept_no group by d.dept_no;


29.查詢各職位最低薪資及其員工姓名

-- 1
select job_title, min(salary) as min_salary from employees group by job_title;-- 2
select e.emp_name, t.* from employees e join (select job_title, min(salary) as min_salary from employees group by job_title) t on t.job_title = e.job_title and t.min_salary = e.salary;


30.查詢各部門職位為“MANAGER”的最低薪資

select dept_no, min(salary) from employees where job_title = 'MANAGER' group by dept_no;


31.查詢全體員工的年收入,升序排列

select emp_name, (salary + ifnull(commission, 0)) * 12 as year_income from employees order by year_income asc;


32.查詢薪資高于3000的領導及其下屬

select ee.emp_name as employee, ee.salary, er.emp_name as employer, er.salary from employees ee join employees er on ee.manager_id = er.emp_no where er.salary > 3000;


33.查詢名稱中包含“s”?的部門及其總員工薪資、人數

select d.dept_name, ifnull(sum(e.salary), 0) as sum_salary, count(e.emp_name) from employees e right join departments d on d.dept_no = e.dept_no where d.dept_name like '%S%' group by d.dept_name;


34.查詢入職40年以上的員工,并計算為其加薪10%后的薪資

select emp_name, salary, datediff(now(), hire_date) / 365 as work_date, if(datediff(now(), hire_date) / 365 > 40, salary * 1.1, salary) as new_salary from employees;


35.綜合題

????????有 3 張表:students(學生表),courses(課程表),student_course(學生選課表)。

? ? ? ? students(student_id,student_name)代表(學號,姓名),

????????courses(course_id,course_name,teacher)代表(課號,課名,教師),????????

? ? ? ? student_course(student_id,course_id,grade)代表(學號,課號,成績)。

? ? ? ? sql 腳本如下。

-- 創建學生表
CREATE TABLE students (student_id VARCHAR(200) PRIMARY KEY,student_name VARCHAR(200) NOT NULL
);-- 創建課程表
CREATE TABLE courses (course_id VARCHAR(200) PRIMARY KEY,course_name VARCHAR(200) NOT NULL,teacher VARCHAR(200) NOT NULL
);-- 創建選課成績表(含外鍵約束)
CREATE TABLE student_course (student_id VARCHAR(200) NOT NULL,course_id VARCHAR(200) NOT NULL,grade VARCHAR(200) NOT NULL,PRIMARY KEY (student_id, course_id),FOREIGN KEY (student_id) REFERENCES students(student_id),FOREIGN KEY (course_id) REFERENCES courses(course_id)
);-- 插入課程數據
INSERT INTO courses (course_id, course_name, teacher) VALUES
('1', '語文', '張葉'),
('2', '政治', '王強'),
('3', '英語', '宋剛'),
('4', '數學', '趙紅'),
('5', '物理', '黎明');-- 插入學生數據
INSERT INTO students (student_id, student_name) VALUES
('1', '花花'),
('2', '苗苗'),
('3', '黃黃'),
('4', '球球');-- 插入選課成績數據
INSERT INTO student_course (student_id, course_id, grade) VALUES
('1', '1', '40'),
('1', '2', '30'),
('1', '3', '20'),
('1', '4', '80'),
('1', '5', '60'),
('2', '1', '60'),
('2', '2', '60'),
('2', '3', '60'),
('2', '4', '60'),
('2', '5', '40'),
('3', '1', '60'),
('3', '3', '80');COMMIT;

(1)?查詢未選過“黎明”老師的所有學生的姓名

-- 1.查詢 “黎明” 老師所授課程id
select course_id from courses where teacher = '黎明';-- 2.選“黎明”老師的學生id
select student_id from student_course where course_id = (select course_id from courses where teacher = '黎明');-- 3.未選“黎明”老師的學生姓名
select student_name from students where student_id not in(select student_id from student_course where course_id = (select course_id from courses where teacher = '黎明'));


(2)列出 2 門以上(含2門)不及格學生姓名及平均成績

-- 1.查詢兩門及以上成績不及格的學生id
select student_id from student_course where grade < 60 group by student_id having count(*) >= 2;-- 2.查詢該學生的id, 姓名
select s.student_id, s.student_name from students s join student_course sc on s.student_id = sc.student_id where sc.grade < 60 group by s.student_id, s.student_name having count(*) >= 2;-- 3.計算平均成績
select student_id, avg(grade) as average_grade from student_course group by student_id;-- 4.查詢不及格學生的平均成績
select a.student_name, b.average_grade 
from (select s.student_id, s.student_name from students s join student_course sc on s.student_id = sc.student_id where sc.grade < 60 group by s.student_id, s.student_name having count(*) >= 2) a 
join (select student_id, avg(grade) as average_grade from student_course group by student_id) b 
on a.student_id = b.student_id;


(3)既選過 1 號課程又選過 2 號課所有學生的姓名

-- 1.選擇“1”或“2”兩門課的學生id
select student_id from student_course where course_id ='1';
select student_id from student_course where course_id ='2';-- 2.選擇“1”和“2”兩門課的學生id
select student_id from student_course where course_id = '1' and student_id in(select student_id from student_course where course_id ='2');-- 3.查詢對應的學生姓名
select s.student_name from students s join (select student_id from student_course where course_id = '1' and student_id in(select student_id from student_course where course_id ='2')) t on s.student_id = t.student_id;

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/pingmian/79451.shtml
繁體地址,請注明出處:http://hk.pswp.cn/pingmian/79451.shtml
英文地址,請注明出處:http://en.pswp.cn/pingmian/79451.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Jenkis安裝、配置及賬號權限分配保姆級教程

Jenkis安裝、配置及賬號權限分配保姆級教程 安裝Jenkins下載Jenkins啟動Jenkins配置Jenkins入門Jenkins配置配置中文配置前端自動化任務流新建任務拉取代碼打包上傳云服務并運行配置后端自動化任務流新建任務拉取代碼打包上傳云服務并運行賬號權限分配創建用戶分配視圖權限安裝…

虛函數 vs 純虛函數 vs 靜態函數(C++)

&#x1f9e9; 一圖看懂&#xff1a;虛函數 vs 純虛函數 特性虛函數&#xff08;Virtual&#xff09;純虛函數&#xff08;Pure Virtual&#xff09;語法virtual void foo();virtual void foo() 0;是否必須實現? 必須在類中實現? 不在基類實現&#xff0c;派生類必須實現是…

2025年滲透測試面試題總結-拷打題庫36(題目+回答)

網絡安全領域各種資源&#xff0c;學習文檔&#xff0c;以及工具分享、前沿信息分享、POC、EXP分享。不定期分享各種好玩的項目及好用的工具&#xff0c;歡迎關注。 目錄 2025年滲透測試面試題總結-拷打題庫36 PHP代碼常見入口函數查找 PHP框架路由方法熟悉度 PHP變量覆蓋…

STL之vector容器

vector的介紹 1.vector是可變大小數組的容器 2.像數組一樣&#xff0c;采用連續的空間存儲&#xff0c;也就意味著可以通過下標去訪問&#xff0c;但它的大小可以動態改變 3.每次的插入都要開空間嗎&#xff1f;開空間就要意味著先開臨時空間&#xff0c;然后在拷貝舊的到新…

[學成在線]22-自動部署項目

自動部署 實戰流程 下邊使用jenkins實現CI/CD的流程。 1、將代碼使用Git托管 2、在jenkins創建任務&#xff0c;從Git拉取代碼。 3、拉取代碼后進行自動構建&#xff1a;測試、打包、部署。 首先將代碼打成鏡像包上傳到docker私服。 自動創建容器、啟動容器。 4、當有代…

74HC123的電路應用場景

74HC123的電路應用場景 **1. 引腳功能示例****2. 核心功能****&#xff08;1&#xff09;單穩態觸發器****&#xff08;2&#xff09;雙獨立通道****&#xff08;3&#xff09;靈活觸發方式** **3. 工作原理****4. 典型應用場景****&#xff08;1&#xff09;定時與延時控制***…

【人工智能】大模型安全的深度剖析:DeepSeek漏洞分析與防護實踐

《Python OpenCV從菜鳥到高手》帶你進入圖像處理與計算機視覺的大門! 解鎖Python編程的無限可能:《奇妙的Python》帶你漫游代碼世界 隨著大語言模型(LLM)的廣泛應用,其安全性問題日益凸顯。DeepSeek作為中國領先的開源AI模型,以低成本和高性能著稱,但近期暴露的數據庫…

《ESP32音頻開發實戰:I2S協議解析與WAV音頻錄制/播放全指南》

前言 在智能硬件和物聯網應用中&#xff0c;音頻處理能力正成為越來越重要的功能——無論是語音交互、環境音采集&#xff0c;還是音樂播放&#xff0c;都離不開高效的音頻數據傳輸與處理。而I2S&#xff08;Inter-IC Sound&#xff09;作為專為音頻設計的通信協議&#xff0c…

大數據實時數倉的數據質量監控解決方案

實時數倉不僅僅是傳統數據倉庫的升級版,它更強調數據的實時性、流動性和高可用性,通過對海量數據的即時處理和分析,為企業提供近乎實時的洞察力。這種能力在金融、零售、制造、互聯網等行業中尤為關鍵,例如,電商平臺可以通過實時數倉監控用戶行為,動態調整推薦算法;金融…

56認知干貨:智能化產業

如果在不久的未來,一座高樓大廈的建設,只需將圖紙輸入系統,無數臺機器人就能精準協作完成任務; 電影節的主角不再是人類,動漫與影視作品將不再需要人類創作; 當播種和收獲的工作無人參與,所有過程都能自動化進行; 這將預示著我們將迎來一個智能化社會,在這個社會中,…

使用synchronized關鍵字同步Java線程

問題 在Java多線程編程中&#xff0c;你需要保護某些數據&#xff0c;防止多個線程同時訪問導致數據不一致或程序錯誤。 解決方案 在需要保護的方法或代碼段上使用synchronized關鍵字。 討論 synchronized關鍵字是Java提供的同步機制&#xff0c;用于確保在同一時刻只有一…

MATLAB基于格拉姆角場與2DCNN-BiGRU的軸承故障診斷模型

本博客來源于CSDN機器魚&#xff0c;未同意任何人轉載。 更多內容&#xff0c;歡迎點擊本專欄目錄&#xff0c;查看更多內容。 目錄 0 引言 1 格拉姆角場原理 2 2DCNN-BiGRU網絡結構 3 應用實例 3.1 數據準備 3.2 格拉姆角場數據提取 3.3 網絡模型搭建-重中之重 3.4 …

電氣設備器件選型參數---斷路器

斷路器 一、基本電氣參數 額定電壓&#xff08;Ue&#xff09; 必須≥系統最高工作電壓&#xff08;如380V、660V等&#xff09;。 注意直流/交流系統的區別&#xff0c;直流斷路器需專門設計。 額定電流&#xff08;In&#xff09; 根據負載的持續工作電流選擇&#xff0c;…

Linux常用命令30——groupadd創建新的用戶組

在使用Linux或macOS日常開發中&#xff0c;熟悉一些基本的命令有助于提高工作效率&#xff0c;groupadd命令的功能是創建新的用戶組。每個用戶在創建時都有一個與其同名的基本組&#xff0c;后期可以使用groupadd命令創建出新的用戶組信息&#xff0c;讓多個用戶加入指定的擴展…

微信小程序 自定義組件 標簽管理

環境 小程序環境&#xff1a; 微信開發者工具&#xff1a;RC 1.06.2503281 win32-x64 基礎運行庫&#xff1a;3.8.1 概述 基礎功能 標簽增刪改查&#xff1a;支持添加/刪除單個標簽、批量刪除、重置默認標簽 數據展示&#xff1a;通過對話框展示結構化數據并支持復制 動…

wpf CommandParameter 傳遞MouseWheelEventArgs參數 ,用 MvvmLight 實現

在 WPF 中使用 MVVM Light 框架傳遞 MouseWheelEventArgs 參數至 CommandParameter,可通過以下步驟實現: ?1. XAML 中配置事件綁定? 在控件上通過 EventToCommand 綁定鼠標滾輪事件,并啟用 PassEventArgsToCommand 屬性以傳遞事件參數: <!-- 命名空間聲明 --> x…

vmware diffy配置ollama 本機ip無法訪問

防火墻直接關閉 本地測試&#xff0c;給它直接關了 ollama配置 vim /etc/systemd/system/ollama.service這是的配置 [Unit] DescriptionOllama Service Afternetwork-online.target[Service] Environment"OLLAMA_HOST0.0.0.0:11434" #Environment"OLLAMA_OR…

React--》掌握react構建拖拽交互的技巧

在這篇文章中將深入探討如何使用react-dnd&#xff0c;從基礎的拖拽操作到更復雜的自定義功能帶你一步步走向實現流暢、可控且用戶友好的拖拽體驗,無論你是剛接觸拖拽功能的初學者還是想要精細化拖拽交互的經驗開發者&#xff0c;都能從中找到適合自己的靈感和解決方案。 目錄 …

數據結構與算法:回溯

回溯 先給出一些leetcode算法題&#xff0c;以后遇見了相關題目再往上增加 主要參考代碼隨想錄 2.1、組合問題 關于去重&#xff1a;兩種寫法的性能分析 需要注意的是&#xff1a;使用set去重的版本相對于used數組的版本效率都要低很多&#xff0c;大家在leetcode上提交&#x…

iview 分頁改變每頁條數時請求兩次問題

問題 在iview page分頁的時候&#xff0c;修改每頁條數時&#xff0c;會發出兩次請求。 iview 版本是4.0.0 原因 iview 的分頁在調用on-page-size-change之前會調用on-Change。默認會先調用on-Change回到第一頁&#xff0c;再調用on-page-size-change改變分頁顯示數量 此時就會…