What is the problem with the data returned by the sql query in the mysql database?

Multi-table management, because the sum operation is used, so even if there is no data mybatis query will become one. The result is that null, if the default value is set on the sum, such as 0, it will return a piece of data that only the field sum is 0. This situation does not meet the query result requirements, is there any way to avoid it? if there is no data, it should be empty, and the number of data entries is 0. Can MySQL query statement or mybatis be implemented?

Feb.28,2021

do you dare to say yes when I call you?
select * from (
select count (0) as a from logivisual.excel_cell where id > 1
) as b where b.a > 0;

Menu