sql server中如何查询某行中列最大的,并将这行中其他列显示出来
发布网友
发布时间:2022-05-06 00:01
我来回答
共1个回答
热心网友
时间:2023-10-10 03:22
SELECT top 1
a.cateid,
COUNT(*) t1,
b.cate
FROM
[ LinShi ].[ dbo ].[ temp_Report883 ] AS a
JOIN clipping.dbo.categories AS b ON a.cateid = b.cateid
WHERE
diyuid = 2579
GROUP BY
a.cateid,
b.cate
order by
count(*) desc