How to remove the type of values (minimum, maximum, medium) and the value in 2 columns



  • As in two columns (pay and salary scale) quote the maximum salary, minimum and average of the plate in which staff salaries are in one column.



  • SELECT 'MIN' as  type, MIN(salary) AS salary FROM table
    union all
    SELECT 'MAX' as  type, MAX(salary) AS salary FROM table
    union all
    SELECT 'AVG' as  type, AVG(salary) AS salary FROM table
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2