Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jmoseley
Starting Member
6 Posts |
Posted - 2000-12-06 : 16:25:22
|
| I want to return the last test score insted of the Max(t.score) is there any way to do this, It would be returned associated with max(t.test_date).I only want to get 1 record for each l.test_link_idselect distinct l.test_link_id, avg(distinct t.score)* 100 as Average_Score, l.test_link_name, max(t.test_date) as Test_Date, Max(t.score) * 100 as Last_Score, count(*) as Times_Takenfrom test_scores t, test_link l where user_kdev_user_id='userid'and t.test_date=t.test_dateand t.test_link_test_link_id=l.test_link_idgroup by l.test_link_name, l.test_link_idorder by t.test_date descThank you for your help. |
|
|
|
|
|