In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the grouping query method of oracle". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the grouping query method of oracle.
Group query, use of statistical functions
02. Find out how many records there are in the emp table.
03. Query the emp table for each department's department code, sum of salaries, and average salary.
04. Query the department code and number of departments whose number of departments is greater than or equal to 2 in the emp table.
05. Query the department code and average salary of the departments whose average salary is less than or equal to 2000 in the emp table, and sort the average salary from large to small.
06. Query the department code and average salary of the departments whose total salary is greater than or equal to 1000 in the emp table, and sort the average salary from large to small.
07. Query the names and salaries of the employees with the lowest and highest salaries in the emp table, and sort them by salary from largest to smallest.
08. List all kinds of jobs with a minimum salary greater than 1500 and the total number of employees engaged in this job.
09. List the names and salaries of all employees whose salary is equal to the salary of the 30 employees in the department.
10. List the number of employees working in each department, average salary, and average length of service.
11. List the minimum wage for each job and the names of the employees engaged in the job.
twelve。 List the minimum salary of MANAGER (managers) in each department.
13. List the annual salary of employees, sorted by annual salary from low to high.
14. Inquire about the maximum, minimum, average and sum of the company's employees' wages.
15. Query the maximum, minimum, average and sum of wages of employees in each job.
16. Select the number of employees for each job (hint: group job).
17. Inquire about the gap between the maximum wage and the minimum wage.
18. Query the bonus of employees in the emp table. If there is no bonus, the default is 0. Use case when.
19. Salary below 2000 'poor' 2000-3000 'medium', 3000-5000 'good', more than 5000 'excellent'
two。 Row transfer column 10 20 30
3 5 6
At this point, I believe you have a deeper understanding of the "grouping query method of oracle". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.