mysql-notes icon indicating copy to clipboard operation
mysql-notes copied to clipboard

这个 SQL 如何优化?

Open diguage opened this issue 5 years ago • 0 comments

select id,
       uuid,
       billId,
       -- 各种字段
from bill_rule
where uuid= '1'
  and billId = (select billId
                from bill_rule
                where uuid= '1'
                  and billStatus = 1
                order by billDate desc
                limit 0,1);

diguage avatar Sep 25 '20 07:09 diguage