var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Query Problem
I am trying retrieve all records in a table by the max presciption by group of territory.
In my table I have columns-- IMS_num, last_name, terriorty_num, pres_num
I want to see all the data by territory and max pres_num
I am lost.
I got this far..
select max(pres_num) from table group by territory_num.
I do not know how to get the last_name and territory_num displayed.
Perhaps it'll help ...
SELECT territory_num, last_name, max(pres_num)
GROUP BY territory_num, last_name;