Want to group by (branch) for each user (custom) the second value (accnum), SQL how to write?
CodePudding user response:
Select * from top 1
(select the top 2 custom, the sum (accnum) as hj from a group by the custom order by hj desc) b order by hj
CodePudding user response:
Similar this kind of search, and by the SQL statement, a little disappointing,I was taken by circulation combined with SQL search statement, compared to fit in