The magic of sql subquery use it as a subtable after from, use it as a subcondition after where, and use it as a subfield after select
Yesterday, when I went to the client’s side and asked the client’s sister to query a piece of sql for me, I found that the sql [subquery] can also be written like this: SQL subqueries can not only appear after from as a table structure, for example: select t1.company_id,t1.company_name,t1.department_id,t2.department_name from company t1, ( select * …