发表于: 2017-05-07 23:43:12
1 1269
今天完成的事情:
1. 又写了一天接口,总是觉得自己写的有问题,但又不知道怎么去改
要求:选出一个职业下的最后一个任务的id(应该是根据num来判断,根据id判断会有错误)
自己从网上找了个方法实现的
select oid,id,numfrom task as awhere num = (select max(num) from task as b where a.oid = b.oid group by oid)order by oid
一丁师兄给的sql:
select * from task a where 1> (select count(id) from task b where b.oid = a.oid and b.num > a.num )
虽然不太懂,但是感觉很nb,说明我还差得远。
2. 必须对需求讲解发一下牢骚了,感觉听不太懂,希望每次听之前先把原型看几遍。
明天计划的事情:
1.修真院demo
遇到的问题:
收获:
评论