postgresql
文章平均质量分 75
。Tsundereิ
一颗小白菜
展开
-
postgresql 练习题(三)
显示所有在欧洲区域工作的员工,显示他们的部门,姓名,岗位,薪资,国籍,结果按照国籍升序,薪资降序排列 select department_name, last_name, job_id, salary, country_name,region_idfrom employees e, departments d, locations l, countries cowhere e.department_id = d.department_idand l.country_id = co.countr..原创 2022-03-19 06:00:00 · 281 阅读 · 0 评论 -
postgresql 练习题(二)
显示部门编号、部门名字、该部门的员工数、每个部门的平均工资,部门负责人信息,包括姓名、薪水、职业;平均工资保留2位小数,千分位分隔符显示;结果按部门升序select employee.department_id,employee.employees,to_char(employee.avg_sal,'99,999.00') as avg_sal,department_name,manager.job_id,manager.last_name,manager.salaryfrom (select..原创 2022-03-18 10:24:14 · 1101 阅读 · 0 评论 -
postgresql 练习题(一)
根据数据字典,查询当前用户下有哪些表 select tablename from pg_tables where schemaname='public' 查询所有员工编号,员工姓名、邮件、雇佣日期、部门、部门详细地址信息。 select employees.employee_id,employees.first_name||employees.last_name as full_name,employees.email,employees.hire_date,departments.d...原创 2022-03-18 09:50:13 · 760 阅读 · 0 评论