choosing oldest valued cell when 2 columns have same value but third column has differing values (SQL)



  • In SQL, I have three columns, the first two are values to create distinction for a person. The third column will have different values for each person (dates). How do I select the row for each person with the oldest valued date?

    enter image description here

    should output:
    John Plumber 1/3/2020
    Elizabeth Teacher 12/1/2020



  • SELECT First Name, 
           Job, 
           MIN(Day of material)  
    FROM table  
    GROUP BY First Name, Job
    

    EASY!!!


Log in to reply
 

Suggested Topics

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