Select语句嵌套用法一则:
核心方法如下:
select temp_tb.x, temp_tb.y, temp_tb.z
from (select table_B.x, table_B.y,count(table_A.x) as z from table_A, Table_B where Table_A.x = Table_B.x) temp_tb
where temp_tb.z >[somevalue]
将select table_B.x, table_B.y,count(table_A.x) as z from table_A, Table_B where Table_A.x = Table_B.x查询结果作为新的临时表嵌套入外层select语句的
from 段中作为查找目标表使用。