下面的sql怎么写?求助(酷狗的笔试题)
第一题我是这样写的,不知道对不对(不对的话还请大佬帮修改下),select songid from t_play as t1(select count(*) from t_play as t2 where t2.dt=t1.dt and t2.area=t1.area and t2.play_cnt<t1.play_cnt)<=2, 另外还有简单的写法吗?这个用group by能实现吗?
第二题不会写,求教!
相关推荐
查看10道真题和解析