Çó½âÂ¥Ö÷À´µã²âÊÔÊý¾Ý ¿´¿´ select a.* from t_hykbgjl a left join t_hykbgjl b on a.sJlbh=b.sJlbh+1 where b.nYe+a.nFse<>a.nYe
--sql 2000ÓÃ×Ó²éѯ SQL code: select m.* , n.* from ( select t.* , px = (select count(1) from t_hykbgjl where sKH = t.sKH and ¼Ç¼ºÅ < t.¼Ç¼ºÅ) + 1 from t_hykbgjl t ) m, ( select t.* , px = (select count(1) from t_hykbgjl where sKH = t.sKH and ¼Ç¼ºÅ < t.¼Ç¼ºÅ) + 1 from t_hykbgjl t ) n where m.sKH = n.sKH and n.px = m.px - 1 and m.nYe + n.nFse <> m.nYe
select o_customer,o_price from orders having o_price >=avg(o_price) select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders) ÎҸоõûÓÐÇø±ð°¡£¬ÔõôÔÚmysql»áÓÐ ......