fork(1) download
  1. CREATE TABLE test_table
  2. (tname varchar(25),
  3. ttest varchar(25),
  4. tscore float NOT NULL) ;
  5.  
  6. insert into test_table (tname,ttest,tscore) values ('Bob','Test1','97.0'),
  7. ('Bob','Test2','96.5'),
  8. ('Bob','Test3','94.5'),
  9. ('Joe','Test1','96.5'),
  10. ('Joe','Test2','98.5'),
  11. ('Joe','Test3','92.0');
  12.  
  13. select distinct tname, min(tscore) as min_score, max(tscore) as max_score from test_table group by tname;
Success #stdin #stdout 0s 3396KB
stdin
Standard input is empty
stdout
Bob|94.5|97.0
Joe|92.0|98.5