Skip to content
Advertisement

How to select only rows from a table one clumns value is more than b table count value in MySQL

Table A:

Table B:

How select table B rows value of max_stu more than table A count(*) where a.school_code=b.school_code ?

Expected result:

Advertisement

Answer

One method would use a correlated subquery. That looks pretty similar to how you already formulated it.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement